-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install pip deps like conda #2241
Install pip deps like conda #2241
Conversation
Suppose we have the following dependencies in the environment.yml: ``` dependencies: - pip - pip: - -r requirements.txt - -e deps/my_local_package ``` Without this commit, it is impossible to install such dependencies with micromamba. That is because micromamba was creating its own temporary requirements.txt file in the /tmp directory and called pip to install them. For some reason pip resolves `-r` paths as relative to the file that contains them, but `-e` paths as relative to the current working directory. It is a known issue in pip: pypa/pip#8765. So in the case of mamba, pip looks for `/tmp/requirements.txt` and `directory/of/env/yml/deps/my_local_package` and unless whole project is thrown right into `/tmp` this installation will fail. This commit makes it so installing pip deps matches the behavior of conda.
932ead4
to
374d8b7
Compare
Thanks for the PR! Can you please add a test for this change? |
I think I fixed the formatting errors, however I am not sure where I should write those tests. |
You could add a test in the micromamba Python tests, maybe here? https://github.com/mamba-org/mamba/blob/main/micromamba/tests/test_create.py Feel free to create additional test files. I just saw that there are |
I've made some small adjustments. Since this doesn't make the testing status worse, I think it's fine to merge as is. |
Fixes #1894