I'm using PyCharm 3.4.1, and I've configured it to use an interpreter from a Python 3.4 venv.
However, when I do an external "pip install" of additional packages to the venv, PyCharm's code analysis still highlights references as being unsatisfied. (Most recently, after installing a package as editable source.)
Quitting & restarting resolves the issue. But is there any other way to kick/refresh PyCharm's idea of what's available to the venv interpreter?
Set an existing virtual environmentPress Ctrl+Alt+S to open the IDE settings and select Project <project name> | Python Interpreter. icon and select Show All. Select the target environment from the list and click OK to confirm your choice.
So back to your question, when you create an env in Pycharm, it will ask you which env do you want to create: Virtualenv Environment , Conda Environment , or Pipenv Environment . As for me, I usually choose Pipenv Environment as this env will be bound to the current project and can generate a lock file.
Help > Find Action
:
→ Rescan Available Python Modules and Packages
Available from PyCharm 2020.1.2 (YouTrack Issue)
I was able to solve this by editing the interpreter path of the environment you are using, then editing it back and applying. Still not perfect, but you don't have to restart PyCharm.
You can edit it in Preferences/Project/Project Interpreter. Click on cog wheel next to the dropdown interpreters.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With