No menu for adding WSL python interpreter in PyCharm - python

I was following this guide from official jetbrains page, until the step 2 comes in the existence.
In the picture mentioned in that page, has so many options like ssh, wsl, vagrant, docker, etc. In my pycharm (latest 2019.3.4) it only shows 4 options - venv, conda, pipenv and system-interpreter.
There is no WSL menu in the add python interpreter dialog.
See the below image:
Searched web for an hour and found no results that show how to fix it. I started plugin search in the PyCharm if there's an external plugin to do so, but there were no plugin named as WSL.
I don't know how to setup the WSL interpreter, I have python3.8 installed on my wsl right now.
Any help will be appreciated!

I have solved this by
Uninstalling pycharm with history and cache.
Removing folders completely from C:\Users\%USERNAME%\AppData\Local and C:\Users\%USERNAME%\AppData\Roaming\JetBrains and
Clean re-install of pycharm
WSL interpreter option shows up as normal
Ideavim is creating a conflict I guess.

This helped me without having to reinstall PyCharm. In PyCharm go to
File, Manage IDE Settings, Restore Default Settings.
I think PyCharm was unable to find my WSL after I updated my WSL's Ubuntu 20.04 to Ubuntu 22.04 and changed the name. (Maybe this issue wouldn't have come up if I had kept the name "Ubuntu-20.04".)

Related

problem with pycharm interperter and installing packages

I have a problem with installing packages in my pycharm project.
Until today everything worked perfectly, I could install packages and everything worked.
I didn't change anything but now everytime I try to install new package I get an error
pycharm message 1
pycharm message 2
But I do have pip installed in python interpreter
interpreter packages
I'm trying to understand what is the problem and how to fix it.
I'm not sure if this is the problem, but the interpreter is python 3.7 and the weird thing is when I'm checking the version on my cmd it's 3.8.3 but when I checked on Windows's apps it showed python 3.7.3
python version from cmd
Is there a reason it happened just randomly after it worked perfectly in the last couple of weeks I worked on the program?
Maybe it's because i updated the pip?
You can try few things
Running same command in terminal. If it doesn't work then please locate your pip.exe which is generally in the Scripts folder right next to python.exe. Make sure the path/to/folder is in environment variables
Reset project settings. Try deleting .idea directory in your project. This folder is created by pycharm to save settings. Open the project folder again in pycharm and set the interpreter.
Did you try to install directly with pip in the terminal ? If it doesn't work maybe you should reinstall it

Why won't PyCharm see my libraries?

If I do something like "import selenium" (or any other kind of third party library) in a .py file and then run it from the terminal, it works just fine. But if I make a new file in PyCharm CE and do the same thing, it can't find the library / module.
How can I fix this or get it to point in the right location? I use a Macbook Pro.
You need to setup your project in PyCharm to use the Python interpreter that has your libraries:
Go to: file->settings->project->project interpreter
And select the appropriate interpreter from the dropdown. After selecting an interpreter, the window displays a list of libraries installed on that interpreter; this should further help you make the right selection.
I've faced a similar issue on Pop!_OS after installing PyCharm via Flatpak. I think the installation is somehow incomplete, as I've had these issues (among others):
Installer could not create the menu shortcut due to the lack of credentials. Unlike during a typical installation, it wouldn't ask for the password and instead I had to uncheck that option altogether.
Built-in terminal defaulted to sh. Even after changing to bash, it would not read my .bashrc and many commands were missing.
After changing the interpreter into a local virtualenv, it would just default to Python 3.7 (even though the version was actually 3.8) and it didn't see any of my installed libraries.
When I've tried to use a Docker Compose environment, IDE failed to detect Docker Compose installation.
I've eventually uninstalled PyCharm and downloaded it directly from Jetbrains website to make it work correctly.

How to get VirtualEnv TensorFlow to work in PyCharm?

So I installed tensorflow onto my mac through the main response from here: https://stackoverflow.com/a/33691154/6095482
This means that my tensorflow works in a virtualenv. I can run it through my terminal for scripting purposes, but was wondering if there's any way to port that onto an IDE. I am familiar with pycharm, but couldn't figure out the path routing and virtual environments in order to get it going. Does anyone have any advice on where to take this and which IDE would be good?
Thanks!
You have installed tensorflow in a virtualenv, here's how to get PyCharm to use it:
First you want to add that virtualenv you created and installed tensorflow in, as an interpreter in PyCharm. Please follow this guide from PyCharm makers: Adding Existing Virtual Environment
You will want to select python executable from your virtualenv forlder, e.g. your_venv/bin/python
Once added as an interpreter you want to select it for your project. Here's a guide: Selecting Python interpreter for a project

How to configure Eclipse for PyDev? Python doesn't appear in Preferences window

I'm trying to install PyDev in Eclipse 3.6 on Windows 7.
I have Python 2.7 successfully installed. I installed PyDev through Eclipse, and restarted.
When attempting to configure Eclipse to find my installed Python, (Window -> Preferences) the list that appears does not contain Python. (See image below.)
If I go back to Help -> Install New Software to check what has been installed, PyDev appears as having been installed.
I've tried quitting Eclipse and opening again, with no change. I tried uninstalling PyDev, and re-installing, with no effect. Any ideas how to get Eclipse to see PyDev?
There's an issue when installing plugins under Windows 7 with UAC (User Access Control) active. You need to run as administrator. Read my blog post for more details.
I had the same issue with interpreters not seen for pydev/python.
I followed the link1 below, I had to use the PyDev 3.2.0.zip file and install it with 7zip in the dropin folder, for my system it is:
"eclipse-SDK-3.5.2-win32-x86_64__classicversion\eclipse\dropins" folder. (if you just right click to unzip (not using 7zip) in the dropins folder, you get the 0x80010135 Path too long error).
Then I had to reboot my windows 7 64bit pc to see the pydev/python interpreters.
Then follow link2 and watch derek banas python online videos where he goes over the installs and tutorials.
link1: http://pydev.org/manual_101_install.html
then at the bottom of the page select
http://pydev.org/manual_101_interpreter.html
Note: I also had to use the unzip trick for other eclipse updates ...

Eclipse: PyDev installation difficulties

I'm having difficulty getting PyDev to work.
I had an installation of Eclipse for PHP developers (1.2.1.20090918-0703). A month ago, I installed PyDev, and everything worked great. I go to fire it up this morning, and PyDev is gone. There is no option to create a Python project, the Python language editor is missing, etc.
Eclipse for PHP does not say that PyDev is installed, so I grab it from the update URL. The version that comes down is 1.5.6. I restart after the installation, and everything works fine again. Sweet.
Then, I grab Subclipse 1.0.7. Upon restarting after that installation, PyDev is now gone. It isn't recognizing Python projects or Python files, etc. So I uninstall Subclipse. PyDev is still gone. Uninstalling and reinstalling PyDev again doesn't bring it back.
What am I doing wrong? Do I need a different version of Eclipse?
UPDATE: I downloaded a fresh copy of Eclipse for Java, did all this over again, and had PyDev working fine. Then, when I downloaded JSEclipse, PyDev again disappeared. This is super frustrating.
UPDATE 2: Another fresh copy of Eclipse. This time I downloaded Subclipse first. It worked fine. Then I downloaded JSEclipse, and Subclipse is gone.
there's an easy way to install plugin for eclipse, download the pydev package zip file (not install it via eclipse update), extract it, and put it into your eclipse/dropins/pydev folder.
this is a hidden way to install plugin.

Categories