尝试在工作中的项目中创建虚拟环境...
conda update virtualenv
virtualenv venv
返回以下内容:
Using base prefix 'C:\\Users\\njho\\Anaconda3'
Traceback (most recent call last):
File "C:\Users\njho\Anaconda3\Scripts\virtualenv-script.py", line 10, in <module>
sys.exit(main())
File "C:\Users\njho\Anaconda3\lib\site-packages\virtualenv.py", line 712, in main
symlink=options.symlink)
File "C:\Users\njho\Anaconda3\lib\site-packages\virtualenv.py", line 927, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "C:\Users\njho\Anaconda3\lib\site-packages\virtualenv.py", line 1149, in install_python
writefile(site_filename_dst, SITE_PY)
File "C:\Users\njho\Anaconda3\lib\site-packages\virtualenv.py", line 363, in writefile
with open(dest, 'wb') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\njho\\Documents\\companyX\\projectX\\venv\\python37.zip\\site.py'
有人知道这里发生了什么吗?我最近刚使用virtualenv
没问题。它正在查找的目录在我的项目中,并且尚未创建。
这是崩溃时目录的样子-我们可以看到文件显然不存在...:
谢谢!