pghilardi / atom-python-virtualenv

Python virtualenv support for Atom
MIT License
16 stars 6 forks source link

Libraries are imported even if they dont exist in current venv #40

Open aseem-hegshetye opened 4 years ago

aseem-hegshetye commented 4 years ago

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

pghilardi commented 4 years ago

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

rpalloni commented 4 years ago

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