atom-python-virtualenv icon indicating copy to clipboard operation
atom-python-virtualenv copied to clipboard

Libraries are imported even if they dont exist in current venv

Open aseem-hegshetye opened this issue 6 years ago • 2 comments

I set atom to venv1. This virtual env doesnt have a library called tensorflow. But when I try to import it in my py file, it works without error. Ideally it should throw an error saying package doesnt exist.

I have another venv2 which has library called tensorflow installed in it. When I move to this venv, then my code should be able to import tensorflow sucessfully.

Am I missing something here? Thanks

aseem-hegshetye avatar Aug 04 '19 16:08 aseem-hegshetye

No,

If this is happening this is a bug. When you move from one env to other env the plug-in should use only libraries available in the new env.

Is this still happening?

Thanks

pghilardi avatar Nov 21 '19 10:11 pghilardi

I correctly set up the venv with ctrl + alt + v and get the message "Virtualenv changed with success!" The problem is that when I import some module it is loaded from the global and not from the env.

not_loading_module

when I run the program from terminal, it correctly loads from env /ds/env/lib/python3.7/site-packages/scipy/init.py

rpalloni avatar Feb 11 '20 19:02 rpalloni