How to use Pycharm on Windows 10 WSL (Ubuntu) and an Anaconda Environment
已回答
Hello
I'm trying to setup a PC for Pycharm using a Ubuntu WSL on Windows 10.
How do I get Pycharm to recognize a specific anaconda environment?
- Ubuntu is setup as a Windows 10 subsystem (version 18.02)
- Pycharm is installed
- Anaconda on a virtual environment is ready to send to Pycharm's project interpreter--like on my Mac where I have the professional version
Windows is a little foreign to me--any help is appreciated. If this isn't possible, what is a work around that make sense in windows-land? At work, I'm not allowed to run Linux natively....
Much appreciation in advance
G
请先登录再写评论。
Hello,
Unfortunately, there is no such option currently. Please vote for the corresponding feature request in order to increase its priority
https://youtrack.jetbrains.com/issue/PY-32853
What do most windows OS users do in this situation? Do they
I come from a Mac OS environment--where working with Pycharm Pro (and Anaconda) is easy/intuitive. What's the sanest option for Windows usage--when you can't run Linux natively?
Thanks
Hi,
It is not entirely true that you can't make it work.
Provided that you have Pycharm Pro still, you may setup with the remote SSH interpreter option as: Pycharm in Windows, Git in Windows and the Python interpreter, venv, etc. in WSL if you have Pycharm Pro.
It requires running the SSH server in WSL along with setting the "remote" (WSL) and local (Windows) director mappings correctly and disbling deplyment as the directories are utimatly the same.
While I used that solution (approximately a year back), the WSL root location in Windows was %localappdata%\Lxss and you had to run SSH on port 222 (or at least not the standard port 22)
However, I would wait for WSL2, which is out soon and will make quite a few things easier.
My current setup uses Virtualbox, but it obviously comes with an expensive resource overhead.
Hope that helped you a bit.
Cheers
This feature has now been added.
Information has also been added to the guides:
https://www.jetbrains.com/help/pycharm/using-wsl-as-a-remote-interpreter.html
From my understanding this solution doesn't support Anaconda and environments.
So even in the case we are creating our env through a conda.yml file, this would not fully help out.
Is there any other ticket specific to Anaconda support in wsl?
For conda and yml files, please see: https://youtrack.jetbrains.com/issue/PY-19974
Strangely, I didn't find issues specific to WSL and Anaconda so I created a new one: https://youtrack.jetbrains.com/issue/PY-44765
Workaround (also listed in Andrey Resler's ticket): https://youtrack.jetbrains.com/issue/PY-35978#focus=Comments-27-3845045.0-0
This is now officially supported.
However, it doesnt work for me. While following the tutorial, the IDE wont let me finish adding an interpreter.
It doesnt matter if I use the default base, if I use another existing, or if I let DataSpell create one for me.
After selecting any of the 3 options, and even loading all packages inside the environment, it wont find the interpreter.
Hi Renard Agne
I've just double-checked, and you can't set up the WSL Anaconda interpreter for a whole Dataspell workspace, but you can set it individually for each attached directory.