Skip to content
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

Getting ERROR: Invalid requirement: '-libgcc-mutex==0.1' when trying to reproduce PyData NYC talk #58

Open
lesteve opened this issue Dec 3, 2019 · 4 comments

Comments

@lesteve
Copy link

lesteve commented Dec 3, 2019

I am trying to reproduce what @scopatz showed in his PyData NYC talk, i.e. creating wheels for numpy and installing the wheels in a new environment (https://youtu.be/ovMqBLspkK4?t=627):
image

Here is the script I am using:

# create conda-press environment
conda create -n conda-press -c conda-forge python=3.7 conda-press -y
conda activate conda-press

# create numpy wheels
conda press --subdir linux-64 --dont-strip-symbols --skip-python numpy=1.17.3=py37h95a1406_0

# test created wheels in new conda environment
conda create -n test python=3.7 -y
conda activate test
pip install *.whl

The error is:

ERROR: Invalid requirement: '-libgcc-mutex==0.1'

Something I noticed (not sure whether this is important) is that I have an additional wheel (compared to what is shown on the screen https://youtu.be/ovMqBLspkK4?t=677).
image

This additional wheel is:

_libgcc_mutex-0.1-0_main-py2.py3-none-linux_x86_64.whl

Trying to pip install this wheel yields the same error as above:

ERROR: Invalid requirement: '-libgcc-mutex==0.1'

For completeness here are the wheels I get from conda-press (some tiny differences in versions for libgcc_ng 9.2 instead of 9.1 and libopenblas 3.7-4 instead of 3.7-2) :

❯ ls -1 *.whl
libblas-3.8.0-14_14_openblas-py2.py3-none-linux_x86_64.whl
libcblas-3.8.0-14_14_openblas-py2.py3-none-linux_x86_64.whl
_libgcc_mutex-0.1-0_main-py2.py3-none-linux_x86_64.whl
libgcc_ng-9.2.0-0_hdf63c60-py2.py3-none-linux_x86_64.whl
libgfortran_ng-7.3.0-2_hdf63c60-py2.py3-none-linux_x86_64.whl
liblapack-3.8.0-14_14_openblas-py2.py3-none-linux_x86_64.whl
libopenblas-0.3.7-4_h5ec1e0e-py2.py3-none-linux_x86_64.whl
numpy-1.17.3-0_py37h95a1406-cp37-cp37m-linux_x86_64.whl

All the other wheels seem problematic as well (when not using --no-deps), for example:

❯ pip install libblas-3.8.0-14_14_openblas-py2.py3-none-linux_x86_64.whl
Processing ./libblas-3.8.0-14_14_openblas-py2.py3-none-linux_x86_64.whl
Collecting libopenblas<1.0a0,>=0.3.7 (from libblas==3.8.0)
  ERROR: Could not find a version that satisfies the requirement libopenblas<1.0a0,>=0.3.7 (from libblas==3.8.0) (from versions: none)
ERROR: No matching distribution found for libopenblas<1.0a0,>=0.3.7 (from libblas==3.8.0)
❯ pip install libgcc_ng-9.2.0-0_hdf63c60-py2.py3-none-linux_x86_64.whl
Processing ./libgcc_ng-9.2.0-0_hdf63c60-py2.py3-none-linux_x86_64.whl
ERROR: Exception:
Traceback (most recent call last):                                                                                                                                                 
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3012, in _dep_map                                                  
    return self.__dep_map                                                                                                                                                          
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2806, in __getattr__                                               
    raise AttributeError(attr)                                                                                                                                                     
AttributeError: _DistInfoDistribution__dep_map                                                                                                                                     

During handling of the above exception, another exception occurred:                                                                                                                

Traceback (most recent call last):                                                                                                                                                 
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_vendor/packaging/requirements.py", line 93, in __init__                                                    
    req = REQUIREMENT.parseString(requirement_string)                                                                                                                              
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 1828, in parseString                                                            
    raise exc                                                                                                                                                                      
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 1818, in parseString                                                            
    loc, tokens = self._parse( instring, 0 )                                                                                                                                       
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 1562, in _parseNoCache                                                          
    loc,tokens = self.parseImpl( instring, preloc, doActions )                                                                                                                     
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 3752, in parseImpl                                                              
    loc, exprtokens = e._parse( instring, loc, doActions )                                                                                                                         
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 1562, in _parseNoCache                                                          
    loc,tokens = self.parseImpl( instring, preloc, doActions )                                                                                                                     
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 4098, in parseImpl                                                              
    return self.expr._parse( instring, loc, doActions, callPreParse=False )                                                                                                        
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 1562, in _parseNoCache                                                          
    loc,tokens = self.parseImpl( instring, preloc, doActions )                                                                                                                     
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 3735, in parseImpl                                                              
    loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )                                                                                         
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 1566, in _parseNoCache                                                          
    loc,tokens = self.parseImpl( instring, preloc, doActions )                                                                                                                     
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 2935, in parseImpl                                                              
    raise ParseException(instring, loc, self.errmsg, self)                                                                                                                         
pip._vendor.pyparsing.ParseException: Expected W:(abcd...) (at char 0), (line:1, col:1)                                                                                            

During handling of the above exception, another exception occurred:                                                                                                                

Traceback (most recent call last):                                                                                                                                                 
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3092, in __init__                                                  
    super(Requirement, self).__init__(requirement_string)                                                                                                                          
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_vendor/packaging/requirements.py", line 97, in __init__                                                    
    requirement_string[e.loc : e.loc + 8], e.msg                                                                                                                                   
pip._vendor.packaging.requirements.InvalidRequirement: Parse error at "'_libgcc_'": Expected W:(abcd...)                                                                           

During handling of the above exception, another exception occurred:                                                                                                                

Traceback (most recent call last):                                                                                                                                                 
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 178, in main                                                           
    status = self.run(options, args)                                                                                                                                               
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 352, in run                                                            
    resolver.resolve(requirement_set)                                                                                                                                              
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_internal/resolve.py", line 131, in resolve                                                                 
    self._resolve_one(requirement_set, req)                                                                                                                                        
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_internal/resolve.py", line 345, in _resolve_one                                                            
    set(req_to_install.extras) - set(dist.extras)                                                                                                                                  
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2969, in extras                                                    
    return [dep for dep in self._dep_map if dep]                                                                                                                                   
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3014, in _dep_map                                                  
    self.__dep_map = self._compute_dependencies()                                                                                                                                  
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3024, in _compute_dependencies                                     
    reqs.extend(parse_requirements(req))                                                                                                                                           
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3085, in parse_requirements                                        
    yield Requirement(line)                                                                                                                                                        
  File "/home/local/lesteve/miniconda3/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3094, in __init__                                                  
    raise RequirementParseError(str(e))                                                                                                                                            
pip._vendor.pkg_resources.RequirementParseError: Parse error at "'_libgcc_'": Expected W:(abcd...)   
@lesteve lesteve changed the title ERROR: Invalid requirement: '-libgcc-mutex==0.1' Getting ERROR: Invalid requirement: '-libgcc-mutex==0.1' when trying to reproduce PyData NYC talk Dec 3, 2019
@scopatz
Copy link
Contributor

scopatz commented Dec 3, 2019

Thanks for reporting @lesteve - this is a legitimage bug. I think it is caused by some of the changes made in conda-forge where a libgcc mutex package was added (which is why it works in the video, but not here).

As a temporary workaround, I found that adding --fatten to the conda-press call still creates an installable wheel

@lesteve
Copy link
Author

lesteve commented Dec 6, 2019

Thanks for your answer and the work-around!

Out of interest, is it something that should in principle be fixed in conda-press or something that should be reported to conda-forge?

@SantiDu
Copy link

SantiDu commented Aug 20, 2020

Thanks for reporting @lesteve - this is a legitimage bug. I think it is caused by some of the changes made in conda-forge where a libgcc mutex package was added (which is why it works in the video, but not here).

As a temporary workaround, I found that adding --fatten to the conda-press call still creates an installable wheel

Now even adding --fatten won't work.

@scopatz
Copy link
Contributor

scopatz commented Aug 20, 2020

PRs welcome here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants