简体   繁体   English

无法运行程序(python)没有这样的文件或目录

[英]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.

相关问题 无法运行程序“ pip --version”(在目录“。”中):error = 2,没有这样的文件或目录 - Cannot run program “pip --version” (in directory “.”): error=2, No such file or directory PySpark:无法运行程序“/home/user/venv/bin/python”:错误=2,没有这样的文件或目录 - PySpark : Cannot run program “/home/user/venv/bin/python”: error=2, No such file or directory PyCharm 错误:无法运行程序,错误=2,没有这样的文件或目录 - PyCharm error: Cannot run program, error=2, No such file or directory 编写bash文件以为目录中的所有文件夹运行python程序 - Writing a bash file to run a python program for all folders in a directory Python:程序不会在其他目录中运行 - Python: Program will not run in other directory 无法从源目录外部运行 python 文件 - Cannot run python file from outside of source directory java.io.IOException:无法运行程序“python”(在目录“D:\\Doc\\module\\subject”中):CreateProcess error=2, - java.io.IOException: Cannot run program "python" (in directory "D:\Doc\module\subject"): CreateProcess error=2, Python 无法打开文件(“目录”):没有这样的文件或目录 - Python cannot open file ('Directory'): No such file or directory 无法运行python文件 - Cannot run python file Jenkins无法运行程序“python”CreateProcess错误=2,系统找不到指定的文件 - Jenkins Cannot run program “python” CreateProcess error=2, The system cannot find the file specified
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM