简体   繁体   English

PyCharm 中的 python 工作区路径在哪里?

[英]Where is the python workspace path located in PyCharm?

I created a Python project using PyCharm (2019.3.3) in folder F:\FolderA then I realized I meant to create it in F:\FolderB .我在文件夹F:\FolderA中使用 PyCharm (2019.3.3) 创建了一个 Python 项目,然后我意识到我打算在F:\FolderB中创建它。 So I copied my project from FolderA to FolderB .所以我将我的项目从FolderA复制到FolderB Now when I try to install a package, PyCharm says:现在,当我尝试安装 package 时,PyCharm 说:

Cannot start process, the working directory 'F:\Projects\FolderA\MyProject\venv\Scripts' does not exist

I come from C# background, and everything project related is saved in .csproj file.我来自C#背景,所有与项目相关的内容都保存在.csproj文件中。 Does Python have a similar file where it writes project/workspace information? Python 是否有类似的文件用于写入项目/工作区信息? So I can point to the correct path?所以我可以指出正确的路径吗?

Inside /venv/scripts folder there are three "Activate" files.在 /venv/scripts 文件夹中有三个“激活”文件。 It holds the path to the old directory.它保存旧目录的路径。

  • Replace the old paths with new paths用新路径替换旧路径
  • Restart PyCharm重启PyCharm
  • Install package安装package

Here's a screenshot of the path to the files:这是文件路径的屏幕截图: 在此处输入图像描述

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

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