3

I am wondering if there is a way to set environment variables when I use pip to install python wheel I built.

Can I wirte something in setup.py to get this:

pip install wheel_0_I_built == pip install wheel_1_I_built + export MY_ENV=var

where wheel_0_I_built and wheel_1_I_built have same function but wheel_0_I_built sets environment variable when being installed.

Thanks

Lea
  • 53
  • 2
  • 6
  • Put it infront of the command, not at the end. – Klaus D. Aug 03 '20 at 10:02
  • Sorry I didn't understand what you mean. Could you please add more instructions ? – Lea Aug 03 '20 at 10:06
  • `MY_ENV=var pip install wheel_0_I_built `. In any case you just have to place the first part infront of the command you are running (manually). Adding it to a script or setup.py is not recommended. – Klaus D. Aug 03 '20 at 10:14
  • For some reason, I can't set environment variables directly by ```export MY_ENV=var```. Is there any other ways? Thanks – Lea Aug 06 '20 at 04:16

0 Answers0