E:\Osmo\static\qrcode-5.1>pip install qrcode You are using pip version 7.0.3, however version 8.1.2 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' comm and. Collecting qrcode Exception: Traceback (most recent call last): File "D:\Anaconda\lib\site-packages\pip\basecommand.py", line 223, in main status = self.run(options, args) File "D:\Anaconda\lib\site-packages\pip\commands\install.py", line 280, in run requirement_set.prepare_files(finder) File "D:\Anaconda\lib\site-packages\pip\req\req_set.py", line 317, in prepare_ files functools.partial(self._prepare_file, finder)) File "D:\Anaconda\lib\site-packages\pip\req\req_set.py", line 304, in _walk_re q_to_install more_reqs = handler(req_to_install) File "D:\Anaconda\lib\site-packages\pip\req\req_set.py", line 469, in _prepare _file session=self.session) File "D:\Anaconda\lib\site-packages\pip\download.py", line 825, in unpack_url session, File "D:\Anaconda\lib\site-packages\pip\download.py", line 673, in unpack_http _url from_path, content_type = _download_http_url(link, session, temp_dir) File "D:\Anaconda\lib\site-packages\pip\download.py", line 884, in _download_h ttp_url file_path = os.path.join(temp_dir, filename) File "D:\Anaconda\lib\ntpath.py", line 85, in join result_path = result_path + p_path UnicodeDecodeError: 'ascii' codec can't decode byte 0xc8 in position 7: ordinal not in range(128)
估计你的用户名用的中文。试试在site-packages目录中建立一个sitecustomize.py,内容如下:
import syssys.setdefaultencoding("utf-8")