[英]Cannot run program (python) No such file or directory
I was given a code at school to modulate for a research project, but first I would like to run it as it is, unmodulated. 我在学校给了一个代码来调整一个研究项目,但首先我想按原样运行它,未经调制。 Its written in Python, and I use Pycharm CE on Ubuntu 18.04 with Python 2.7 ... I've chosen the correct interpreter in the project settings (I think. The path is /usr/bin/python2.7) and I get this Error Message: 它是用Python编写的,我在Ubuntu 18.04上用Python 2.7使用Pycharm CE ...我在项目设置中选择了正确的解释器(我认为。路径是/usr/bin/python2.7)我得到了这个错误信息:
Error running 'project': Cannot run program "C:/WinPython-64bit-2.7.9.1/python-2.7.9.amd64/python.exe" (in directory "/home/user/Documents/model"): error=2, No such file or directory 运行'project'时出错:无法运行程序“C:/WinPython-64bit-2.7.9.1/python-2.7.9.amd64/python.exe”(在目录“/ home / user / Documents / model”中):error = 2,没有这样的文件或目录
Why is Pycharm still looking for the Interpreter in the folder that, I'm assuming, the user before me used to put it? 为什么Pycharm仍然在文件夹中寻找解释器,我假设,我之前的用户曾经把它放在那里?
You can fix this error by modifying the .idea/workspace.xml
file. 您可以通过修改.idea/workspace.xml
文件来修复此错误。 Search and remove any old interpreters and put the correct one. 搜索并删除任何旧的口译员并放置正确的口译员。
Answer inspired by Ryan Elfman's post: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206597295-Why-can-tI-run-a-script-in-PyCharm-when-I-can-debug-it-I-get-CreateProcess-error-123 回答灵感来自Ryan Elfman的帖子: https : //intellij-support.jetbrains.com/hc/en-us/community/posts/206597295-Why-can-tI-run-a-script-in-PyCharm-when-I -可以调试-IT-I-GET-CreateProcess的错误-123
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.