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

Python2 (Centos 7) setup: 'tests_require' must be a string or list of strings containing valid project/version requirement specifiers #190

Open
gamename opened this issue Mar 31, 2021 · 22 comments

Comments

@gamename
Copy link

Hi,

I'm getting this error when installing on CentOS7:

[tennis@apigee-node-1 ~]$ /bin/pip2 install httplib2
Collecting httplib2
  Using cached https://files.pythonhosted.org/packages/ed/cd/533a1e9e04671bcee5d2854b4f651a3fab9586d698de769d93b05ee2bff1/httplib2-0.19.1.tar.gz
    Complete output from command python setup.py egg_info:
    error in httplib2 setup command: 'tests_require' must be a string or list of strings containing valid project/version requirement specifiers
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-yR92Sb/httplib2/
You are using pip version 8.1.2, however version 21.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Could you investigate, please?

Thanks,
-T

@temoto
Copy link
Member

temoto commented Mar 31, 2021

Is upgrading pip an option for you?

@gamename
Copy link
Author

@temoto Unfortunately, no. This installation is part of a 3rd party ansible role.

@temoto
Copy link
Member

temoto commented Mar 31, 2021

@gamename please show /bin/pip2 freeze |fgrep setupt

@gamename
Copy link
Author

gamename commented Mar 31, 2021

@temoto Here ya go

[tennis@apigee-node-1 ~]$ /bin/pip2 freeze |fgrep setupt
You are using pip version 8.1.2, however version 21.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

@temoto
Copy link
Member

temoto commented Mar 31, 2021

@gamename does it work after /bin/pip2 install setuptools ?

@gamename
Copy link
Author

@temoto Here's what I get for that:

[tennis@apigee-node-1 ~]$ /bin/pip2 install setuptools 
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.7/site-packages
You are using pip version 8.1.2, however version 21.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[tennis@apigee-node-1 ~]$ 

@temoto
Copy link
Member

temoto commented Mar 31, 2021

/bin/pip2 install -U setuptools
/bin/pip2 install httplib2

@gamename
Copy link
Author

@temoto Here's what happened

[tennis@apigee-node-1 ~]$ /bin/pip2 install -U setuptools
Collecting setuptools
  Downloading https://files.pythonhosted.org/packages/94/75/05e1d69c61c4dfaf65ad12785cd18bedc1e0129976c55914d6aea59c7da8/setuptools-54.2.0.tar.gz (2.1MB)
    100% |████████████████████████████████| 2.1MB 420kB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "setuptools/__init__.py", line 16, in <module>
        import setuptools.version
      File "setuptools/version.py", line 1, in <module>
        import pkg_resources
      File "pkg_resources/__init__.py", line 1367
        raise SyntaxError(e) from e
                                ^
    SyntaxError: invalid syntax
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-funexW/setuptools/
You are using pip version 8.1.2, however version 21.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

@temoto
Copy link
Member

temoto commented Mar 31, 2021

@gamename sorry, it'll have to wait best case for tomorrow. I'll get CentOS 7 in virtual machine and find a solution.

@gamename
Copy link
Author

Ok

@gamename
Copy link
Author

gamename commented Apr 1, 2021

@temoto I can get you the GCP terraform setup I'm using if you want. That is, I can give you the terraform scripts to fire up a CentOS 7 box on GCP.

@gamename
Copy link
Author

gamename commented Apr 1, 2021

@temoto Any update?

@gamename
Copy link
Author

gamename commented Apr 5, 2021

Good morning! Any updates?

@dturet-godaddy
Copy link

I'm experiencing the same issue related to Ansible and CentOS, so I'm wondering if a fix for this in progress or planned? Thanks in advance

@temoto
Copy link
Member

temoto commented Apr 5, 2021

Sorry, no updates yet.

@temoto
Copy link
Member

temoto commented Apr 5, 2021

@gamename or @dturet how did you go from clean centos:7 image to /bin/pip2 ?

@temoto
Copy link
Member

temoto commented Apr 5, 2021

@temoto I can get you the GCP terraform setup I'm using if you want. That is, I can give you the terraform scripts to fire up a CentOS 7 box on GCP.

That may help now.

@gamename
Copy link
Author

gamename commented Apr 5, 2021

@gamename or @dturet how did you go from clean centos:7 image to /bin/pip2 ?

Yes. It was a clean image.

@gamename
Copy link
Author

gamename commented Apr 5, 2021

@temoto I can get you the GCP terraform setup I'm using if you want. That is, I can give you the terraform scripts to fire up a CentOS 7 box on GCP.

That may help now.

OK. let me put something together for you.

@temoto
Copy link
Member

temoto commented Apr 5, 2021

Quick workaround pip2 install -U 'setuptools<45'

Setuptools as a project continues to support Python 2 with bugfixes and important features on Setuptools 44.x.

https://setuptools.readthedocs.io/en/latest/python%202%20sunset.html

@temoto
Copy link
Member

temoto commented Apr 5, 2021

@temoto I can get you the GCP terraform setup I'm using if you want. That is, I can give you the terraform scripts to fire up a CentOS 7 box on GCP.

That may help now.

OK. let me put something together for you.

I was able to reproduce the problem. This is no longer needed. Sorry for disturbing.

@gamename
Copy link
Author

gamename commented Apr 5, 2021

@temoto I can get you the GCP terraform setup I'm using if you want. That is, I can give you the terraform scripts to fire up a CentOS 7 box on GCP.

That may help now.

OK. let me put something together for you.

I was able to reproduce the problem. This is no longer needed. Sorry for disturbing.

Np. Glad to hear you can reproduce it.

@temoto temoto changed the title Getting error installing on CentOS 7 Python2 (Centos 7) setup: 'tests_require' must be a string or list of strings containing valid project/version requirement specifiers Apr 12, 2021
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