简体   繁体   English

如何从现有的python程序创建和保存pycharm项目?

[英]how to create and save a pycharm project from an existing python program?

I recently installed TensorFlow on a Ubunu 14.04 machine using virtual environment and installed PyCharm to analyze TensoFlow Python programs. 我最近在使用虚拟环境的Ubunu 14.04机器上安装了TensorFlow,并安装了PyCharm来分析TensoFlow Python程序。

I downloaded mnist_softmax.py , the first tutorial program under ~/TF . 我下载了mnist_softmax.py ,它是~/TF下的第一个教程程序。 I opened it with PyCharm and set the Python interpreter to the one in the virtual environment. 我用PyCharm打开了它,并将Python解释器设置为虚拟环境中的一个。 I can run it, set breakpoint, and do single stepping. 我可以运行它,设置断点并执行单步操作。

Ok, then, I exit PyCharm . 好的,然后我退出PyCharm。 When I start PyCharm again, the recent project list is shown, but the location is /tmp/mnist_softmax.py , not ~/TF/mnist_softmax.py and of course if I try to open it ( /tmp/mnist_softmax.py ), it complains that the file is not there. 当我再次启动PyCharm时,会显示最近的项目列表,但是位置是/tmp/mnist_softmax.py ,而不是~/TF/mnist_softmax.py ,当然,如果我尝试打开它( /tmp/mnist_softmax.py ),它抱怨文件不存在。

How can I save the mnist_softmax.py as a PyCharm project? 如何将mnist_softmax.py为PyCharm项目? I couldn't find the submenu in the File menu. 我在“ File菜单中找不到该子菜单。 I tried Save All before exiting but it was the same and no *.idea file is under ~/TF . 我在退出之前尝试了“ Save All ,但是它是相同的,并且*.idea文件不在~/TF

How can I do it? 我该怎么做?

我发现创建一个项目并添加源文件使pychamr可以将该项目记住为列表中的上一个项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM