当我运行命令python -m virtualenv venv
我得到以下输出:
Traceback (most recent call last):
File "runpy.py", line 184, in _run_module_as_main
File "runpy.py", line 85, in _run_code
File "C:\python\lib\site-packages\virtualenv.py", line 2328, in <module>main()
File "C:\python\lib\site-packages\virtualenv.py", line 713, in main symlink=option.symlink)
File "C:\python\lib\site-packages\virtualenv.py", line 925, in create_environment site_packages=site-packaged clear= clear, symlink=simlink
File "C:\python\lib\site-packages\virtualenv.py", line 1147, in install_python writefile(site_filename_dst, SITE_PY)
File "C:\python\lib\site-packages\virtualenv.py", line 362, in writefile with open(dest, 'wb') as F:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\python\\sites\\venv\\python35.zip\\site.py'
当我导航到&#39; venv&#39;文件夹文件结构完全没有填充只有C:\ Python \ sites \ venv \ Lib \ site-packages(完全为空)
我尝试过重新安装virtualenv并无缘无故地搜索问题。请指教
答案 0 :(得分:0)
您是否在计算机上正确安装了python?我之前也遇到过类似的问题。它是由我的python安装引起的。
你看看你是否检查了你的python路径并转到Lib
文件夹,我认为没有site.py
。你可以:
Lib
和Script
文件夹)setx PYTHONHOME "C:\<your_python_path>"
;将其添加到您的路径:setx PATH "%PATH%;%PYTHONHOME%"
pip
的情况下访问python -m
干杯!!