I understand I can export conda environments with syntax like so:
conda env export -n my_env -f /somewhere/environment.yml
And import them with:
conda env create -f /somewhere/environment.yml -p /somewhere/else/
However, if there is a package I have installed from my private github, using syntax like so:
(my_env) ~/ $ pip install git+https://github.com/user/my_package.git@master#egg=my_package
Or have this in my requirements.txt
, like so:
aiofiles==0.4.0
git+https://github.com/user/my_package.git@master#egg=my_package
chardet==3.0.4
When I do my export, I see this:
name: my_env
channels:
- defaults
dependencies:
- ca-certificates=2019.5.15=0
...
- pip:
- aiofiles==0.4.0
- my_package # UH OH, NO github INSTRUCTION OR VERSION
- chardet==3.0.4
This is a problem, because when I try to run:
conda env create -f /somewhere/environment.yml -p /somewhere/else/
I get an error that conda fails to install because it cannot find my_package
. And this makes sense, the environment does not tell it to look in github.
How can I ask the conda env export
command to be github-pip-installation-aware so that I can faithfully re-create my conda environment without the export failing? (Or even to do this in such a way I won't create exports that are doomed to failure? Ie, this export takes a rather long time---it would be helpful if the export command would fail fast before spending tens of minutes producing an export that cannot be imported.)
Unlike this similar question, I am not using wheels.