I am trying to use Anaconda environment as an interpreter in Pycharm.
It actually works, but it's extremely slow - even running a single line "hello world" takes like 5 sec.
I guess the reason is Pycharm trying to activate the environment before every execution of the script and activation in Anaconda is generally slow (at least from my experience).
The execution speed is ok when using Anaconda root env. or when using virtualenv. Any idea/workaround how to speed it up?
You should not activate the environment on every run. You need to define the interpreter for the project. It will take a couple of seconds to parse the installed packages in that environment and later it will be fast.
https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html#project-interpreter
I wonder if there is something special in the packages you have in your environment. Five seconds is not normal.
Have you tried creating a new environment from pycharm?
https://www.jetbrains.com/help/pycharm/conda-support-creating-conda-environment.html
and later adding the packages that you really need for that project?
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