老师,使用mkvitualenv 时,出错
来源:2-2 virtualenv安装和配置
EnchantF
2018-04-10
C:\Users\wsbe>mkvirtualenv testvir
C:\Users\wsbe\Envs is not a directory, creating
New python executable in C:\Users\wsbe\Envs\testvir\Scripts\python.exe
Installing setuptools, pip, wheel...
Complete output from command C:\Users\wsbe\Envs\testvir\Scripts\python.exe - setuptools pip wheel:
Collecting setuptools
Collecting pip
Collecting wheel
Exception:
Traceback (most recent call last):
File "c:\python27\lib\site-packages\virtualenv_support\pip-9.0.3-py2.py3-none-any.whl\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\python27\lib\site-packages\virtualenv_support\pip-9.0.3-py2.py3-none-any.whl\pip\commands\install.py", line 324, in run
requirement_set.prepare_files(finder)
File "c:\python27\lib\site-packages\virtualenv_support\pip-9.0.3-py2.py3-none-any.whl\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "c:\python27\lib\site-packages\virtualenv_support\pip-9.0.3-py2.py3-none-any.whl\pip\req\req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "c:\python27\lib\site-packages\virtualenv_support\pip-9.0.3-py2.py3-none-any.whl\pip\download.py", line 821, in unpack_url
hashes=hashes
File "c:\python27\lib\site-packages\virtualenv_support\pip-9.0.3-py2.py3-none-any.whl\pip\download.py", line 659, in unpack_http_url
hashes)
File "c:\python27\lib\site-packages\virtualenv_support\pip-9.0.3-py2.py3-none-any.whl\pip\download.py", line 880, in _download_http_url
file_path = os.path.join(temp_dir, filename)
File "C:\Users\wsbe\Envs\testvir\lib\ntpath.py", line 85, in join
result_path = result_path + p_path
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb0 in position 4: ordinal not in range(128)
----------------------------------------
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\virtualenv.exe\__main__.py", line 9, in <module>
File "c:\python27\lib\site-packages\virtualenv.py", line 712, in main
symlink=options.symlink)
File "c:\python27\lib\site-packages\virtualenv.py", line 953, in create_environment
download=download,
File "c:\python27\lib\site-packages\virtualenv.py", line 904, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
File "c:\python27\lib\site-packages\virtualenv.py", line 796, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command C:\Users\wsbe\Envs\testvir\Scripts\python.exe - setuptools pip wheel failed with error code 2
1回答
-
bobby
2018-04-12
https://stackoverflow.com/questions/21129020/how-to-fix-unicodedecodeerror-ascii-codec-cant-decode-byte/35444608 你看看这个能否解决你的问题, 或者尝试先卸载python 然后重装
00
相似问题