Cannot run program (python) No such file or directory(无法运行程序(python)没有这样的文件或目录)

本文介绍了无法运行程序(python)没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在学校获得了一个代码来调制一个研究项目,但首先我想按原样运行它,未调制.它是用 Python 编写的,我在 Ubuntu 18.04 和 Python 2.7 上使用 Pycharm CE ...我在项目设置中选择了正确的解释器(我认为.路径是/usr/bin/python2.7),我明白了错误信息:

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:

运行项目"时出错:无法运行程序C:/WinPython-64bit-2.7.9.1/python-2.7.9.amd64/python.exe"(在目录/home/user/Documents/"中model"): error=2, 没有这样的文件或目录

为什么 Pycharm 仍在寻找我之前的用户曾经放置过的文件夹中的解释器?

Why is Pycharm still looking for the Interpreter in the folder that, I'm assuming, the user before me used to put it?

推荐答案

您可以通过修改 .idea/workspace.xml 文件来修复此错误.搜索并删除所有旧的解释器并放置正确的解释器.

You can fix this error by modifying the .idea/workspace.xml file. Search and remove any old interpreters and put the correct one.

受 Ryan Elfman 帖子启发的答案: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

Answer inspired by Ryan Elfman's post: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206597295-Why-can-t-I-run-a-script-in-PyCharm-when-I-can-debug-it-I-get-CreateProcess-error-123

这篇关于无法运行程序(python)没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!