[英]How do I use Anaconda packages in PyCharm without having to reinstall them?
I mainly use Jupyter Notebooks/Lab through Anaconda and typically install needed packages using pip.我主要通过 Anaconda 使用 Jupyter Notebooks/Lab,通常使用 pip 安装所需的软件包。 However, I've recently started using PyCharm and have been unable to access these packages despite using a Conda environment as my project interpreter and instead have to individually reinstall each of the packages through PyCharm.
但是,我最近开始使用 PyCharm,尽管使用 Conda 环境作为我的项目解释器,但我无法访问这些包,而是必须通过 PyCharm 单独重新安装每个包。
These are my settings when creating a new project in PyCharm:这些是我在 PyCharm 中创建新项目时的设置:
New environment using Conda使用 Conda 的新环境
Location: C:\Users\Name\anaconda3\envs\untitled位置:C:\Users\Name\anaconda3\envs\untitled
Python Version: 3.8 Python 版本:3.8
Conda executable: C:\Users\Name\anaconda3\Scripts\conda.exe Conda 可执行文件:C:\Users\Name\anaconda3\Scripts\conda.exe
I've also added the following three paths to my environment variables:我还在我的环境变量中添加了以下三个路径:
...\anaconda3\Scripts ...\anaconda3\脚本
...\anaconda3 ...\蟒蛇3
...\anaconda3\Library\bin ...\anaconda3\库\bin
Is there a way for me to access the Anaconda packages without reinstalling them for PyCharm?有没有办法让我访问 Anaconda 软件包而不为 PyCharm 重新安装它们? Thank you.
谢谢你。
If you haven't checked it out already, Anaconda has some good documentation on how to use PyCharm with an Anaconda environment that you can check out here .如果您还没有检查过,Anaconda 有一些关于如何将 PyCharm 与 Anaconda 环境一起使用的很好的文档,您可以在这里查看。
You will probably want to use an Existing Environment
rather than create a new one and will have to make sure you point your Conda path to the existing executable (C:\Users\Name\anaconda3\Scripts\conda.exe).您可能希望使用
Existing Environment
而不是创建新环境,并且必须确保将您的 Conda 路径指向现有的可执行文件(C:\Users\Name\anaconda3\Scripts\conda.exe)。 You should then be able to select the existing environments you have setup in the Interpreter
drop down.然后,您应该能够 select 您在
Interpreter
下拉菜单中设置的现有环境。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.