How can I do a pip install requirements.txt to a specific python installation?
This is the location of the python installation:
/opt/conda/envs/prod/bin/python
And my requirements.txt is here:
/home/jupyter/services/requirements.txt
Can I just do something like /opt/conda/envs/prod/bin/python pip install -r /home/jupyter/ml_gcp_services/requirements.txt
??
CodePudding user response:
It looks like you are using conda to manage your Python environments. You first have to activate your environment, check out the conda docs for how to do it and what it actually does. It looks like your environment is called prod
, so you would activate it using:
conda activate prod
Once activated you can simply install your requirements.txt as you would usually do:
pip install -r <path/to/requirements.txt>
The packages will then be installed into your environment.