script for building numpy from source in virtualenv and outside it

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

script for building numpy from source in virtualenv and outside it

Felipe Vieira
Dear fellows,

I'm struggling with a single script to build numpy from source in a virtual env. I want the same script to be able to be run with a normal env.

So if ran from a normal env it should affect all users.
If ran within a virtual env the installation should be constrained to that env.

I tried setting script variables and other tricks but the script is always executed as a 'out of virtual env' user (I cannot make it aware that is running from a virtualenv), thus affecting my real working python. As the script activates other scripts I am not posting them for now (hoping that this is a simple issue).

tl;dr: How can I install numpy from source and build it in a script which uses the virtual env instead of affecting the whole system?

(And yes, I have looked for solutions on google but none of them worked.)

Best regards,

_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.scipy.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: script for building numpy from source in virtualenv and outside it

ralfgommers


On Tue, Dec 27, 2016 at 9:43 AM, Felipe Vieira <[hidden email]> wrote:
Dear fellows,

I'm struggling with a single script to build numpy from source in a virtual env. I want the same script to be able to be run with a normal env.

So if ran from a normal env it should affect all users.
If ran within a virtual env the installation should be constrained to that env.

I tried setting script variables and other tricks but the script is always executed as a 'out of virtual env' user (I cannot make it aware that is running from a virtualenv), thus affecting my real working python. As the script activates other scripts I am not posting them for now (hoping that this is a simple issue).

tl;dr: How can I install numpy from source and build it in a script which uses the virtual env instead of affecting the whole system?

(And yes, I have looked for solutions on google but none of them worked.)

Sounds like you just need to run your script with the Python interpreter in the virtualenv. There's nothing numpy-specific about this.

Ralf


_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.scipy.org/mailman/listinfo/numpy-discussion
Loading...