当我尝试在pycharm中创建一个新项目并将我的基本解释器选择为C:\ Anaconda3 \ python.exe时,会发生此错误。
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1\helpers\packaging_tool.py", line 170, in main
do_pyvenv(path, system_site_packages)
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1\helpers\packaging_tool.py", line 88, in do_pyvenv
venv.create(path, system_site_packages=system_site_packages)
File "C:\Anaconda3\lib\venv\__init__.py", line 363, in create
builder.create(env_dir)
File "C:\Anaconda3\lib\venv\__init__.py", line 66, in create
self.setup_python(context)
File "C:\Anaconda3\lib\venv\__init__.py", line 204, in setup_python
copier(context.executable, path)
File "C:\Anaconda3\lib\venv\__init__.py", line 192, in symlink_or_copy
shutil.copyfile(src, dst)
File "C:\Anaconda3\lib\shutil.py", line 120, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Anaconda3\\lib\\venv\\scripts\\nt\\python.exe'
我不知道该怎么办,只有这个网站可以帮助我。
最佳答案
尝试重新安装python并确保您选中了“设置环境变量”复选框
关于python - FileNotFoundError [Errno 2]没有这样的文件或目录:,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/55664977/