-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
With pip (>20.1.1), User package cannot install ruamel.yaml (silently ignored) in the Conda base environment that has a dependency on ruamel.yaml, but an error occurs while running the user package: ModuleNotFoundError: No module named 'ruamel' #8789
Comments
|
yes, ruamel.yaml is the same as ruamel_yaml. With latest pip (20.2.2), when we try to install a package in conda base environment that has dependency on the ruamel.yaml, installation of the python package work without any issue, but we get an error on the entry point. The python cannot find the required list of packages in the environment as the installed package is ruamel_yaml, but setup.py is configured to look for ruamel.yaml.
Error message:
|
Can you provide steps to reproduce the error? |
Perform these operations in conda base environment, where ruamel_yaml is already installed. Repro from a publicly available package:
root@931f2fb9d7fb:/# pip install nbreport root@931f2fb9d7fb:/# conda list | grep -i ruamel |
We can repro this issue in any conda environment by installing ruamel_yaml before installing the user package: --- Create conda environment (mytest36) root@931f2fb9d7fb:/# conda list | grep -i ruamel |
The problem seems to be that the Conda $ conda create -p test ruamel_yaml
...
$ ls -d test/lib/python3.8/site-packages/ruamel*
test/lib/python3.8/site-packages/ruamel_yaml
test/lib/python3.8/site-packages/ruamel_yaml-0.15.87-py3.8.egg-info
$ test/bin/python -c 'import ruamel.yaml'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'ruamel'
$ test/bin/python -c 'import ruamel_yaml'
$ But this problem was accidentally masked by pip’s inability to detect Conda packager will need to fix the conflicting |
One workaround would be to delete the |
Opened an issue for conda: conda/conda#10178 |
Environment
conda 4.8.4
Description
This issue is encountered in the conda base environment only. Major impact is in on the Docker images where the packages are installed in the base environment. Conda base environment comes up with ruamel_yaml 0.15.87. Installing a package that has dependency on ruamel.yaml fails with an exception on the entry point of the setup.py: The 'ruamel.yaml>=0.15.35' distribution was not found and is required by the application. This dependency: 'ruamel.yaml>=0.15.35' is defined in the setup.py of the user package.
ruamel.yaml installation is IGNORED on conda base environment as ruamel_yaml is already installed from conda base environment. Dot, underscore, and dash are treated as equivalents when comparing package names during the installation of the dependencies but not during the entry point of package.
Expected behavior
The ruamel.yaml package should get installed in conda base environment when defined in setup.py of the user package.
How to Reproduce
Run the inline command in the conda base environment. You may not be able to install ruamel.yaml as ruamel_yaml comes up conda in the base environment. User package cannot install ruamel.yaml (silently ignored) in the Conda base environment that has a dependency on ruamel.yaml, but an error occurs while running the user package: ModuleNotFoundError: No module named 'ruamel'.
Commands to run:
Create conda base environment:
python --version;
pip --version;
pip install ruamel.yaml
Output
The text was updated successfully, but these errors were encountered: