Python Forum
Installing Numpy multiple locations - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Installing Numpy multiple locations (/thread-23289.html)



Installing Numpy multiple locations - dwhe - Dec-19-2019

I am a new user to python so please be kind. I am using python 3 on ubuntu (Linux).

I installed numpy under …/APP1/.env/lib/python3.6/site-packages/

it works when execute APP1.

When I run another unrelated APP2 that needs numpy outside of the .env it says the module cannot be found.

It seems to me like these files (numpy) only work in the env. How do I install it in a way so that it is universally usable by any app that needs it? Also doing it in a way that the first app will not be tampered with and will still be able to locate it.

Please help!


RE: Installing Numpy multiple locations - micseydel - Dec-20-2019

(Dec-19-2019, 11:45 PM)dwhe Wrote: How do I install it in a way so that it is universally usable by any app that needs it?
In a terminal / command line:
pip install numpy
You may need to use pip3 or this:
python3 -m pip install numpy



RE: Installing Numpy multiple locations - dwhe - Dec-20-2019

But will this install it in 2 places? IE twice the memory space? I am running on a virtual machine where space is limited


RE: Installing Numpy multiple locations - micseydel - Dec-20-2019

Yes, if you installed it some other way, you'll have a second copy. Why the worry though? Why not delete the weird one and just use pip?


RE: Installing Numpy multiple locations - dwhe - Dec-21-2019

Because if I delete the weird one then the APP1 may not know where to look for the new one if it is in an env? Am I thinking the right way about that?