工作目录错误 [英] Working directory error

查看:570
本文介绍了工作目录错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用PyCharm 4.04。因为我安装它,每次打开它,作为默认目录我得到这个:


C:\Users\Laura\ AppData\Local\Temp\main.py1.tmp> cd


尝试使用控制台时出现错误:


错误:无法启动进程,为工作目录指定的路径
不是目录


但即使我更改目录,该消息也不会消失。



尽管终端工作正常,但我可以运行项目,但是我想使用控制台。

解决方案

我终于解决了这个问题。



我认为这一切都是开始的,因为我用pycharm打开的第一个项目是在我的下载文件夹中,所以默认情况下工作目录自动设置为临时文件夹并且我已经将项目移动到另一个文件夹,我从终端手动更改了工作目录,这是不起作用的。



解决方案正在创建一个新项目,并给出新项目的正确路径。这似乎很容易,但并不那么明显。


I am working with PyCharm 4.04. Since I installed it, every time I open it, as default directory I get this:

C:\Users\Laura\AppData\Local\Temp\main.py1.tmp>cd

Which gives me an error when trying to use the console:

Error:Cannot start process, the path specified for working directory is not a directory

But even if I change the directory, the message does not disappear.

The terminal, though, it does work and I can run projects, but I would like to use the console.

解决方案

I finally solved the problem.

I think it all started because the first project that I opened with pycharm was in my "download" folder, so the working directory was automatically set to a temporal folder by default and allthough I moved the project to another folder and I manually changed the working directory from the terminal, it was not working.

The solution was creating a new project and giving a correct path to the new project. It seems very easy but it was not that obvious.

这篇关于工作目录错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆