salt: salt pip AttributeError: type object 'InstallRequirement' has no attribute 'from_line'
Description of Issue/Question
after pip upgrade on ubuntu 14.04 to 9.8 -> 18.1 salt state pip.install failing with
AttributeError: type object ‘InstallRequirement’ has no attribute ‘from_line’
To make the state work again uninstall new pip version $ sudo pip uninstall pip $ sudo apt install --reinstall python-pip $ sudo pip install pip==9.0.1 #Note now the sls state pip.install below works
Setup
(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)
#sls file docker: pip.installed: - name: docker - reload_modules: True
Steps to Reproduce Issue
(Include debug logs if possible and relevant.) ##Ubuntu 14.04 sudo pip install --upgrade pip pip --version vagrant@localsandbox:~$ pip --version /usr/local/lib/python2.7/dist-packages/cryptography/hazmat/primitives/constant_time.py:26: CryptographyDeprecationWarning: Support for your Python version is deprecated. The next version of cryptography will remove support. Please upgrade to a 2.7.x release that supports hmac.compare_digest as soon as possible. utils.DeprecatedIn23, pip 18.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)
Versions Report
(Provided by running salt --versions-report
. Please also mention any differences in master/minion versions.)
vagrant@localsandbox:~$ salt-call --versions-report /usr/local/lib/python2.7/dist-packages/cryptography/hazmat/primitives/constant_time.py:26: CryptographyDeprecationWarning: Support for your Python version is deprecated. The next version of cryptography will remove support. Please upgrade to a 2.7.x release that supports hmac.compare_digest as soon as possible. utils.DeprecatedIn23, Salt Version: Salt: 2018.3.2
Dependency Versions: cffi: 1.11.5 cherrypy: Not Installed dateutil: 2.7.3 docker-py: 3.5.0 gitdb: Not Installed gitpython: Not Installed ioflo: Not Installed Jinja2: 2.7.2 libgit2: Not Installed libnacl: Not Installed M2Crypto: Not Installed Mako: 0.9.1 msgpack-pure: Not Installed msgpack-python: 0.4.6 mysql-python: 1.2.3 pycparser: 2.19 pycrypto: 2.6.1 pycryptodome: Not Installed pygit2: Not Installed Python: 2.7.6 (default, Nov 23 2017, 15:49:48) python-gnupg: 0.4.3 PyYAML: 3.10 PyZMQ: 14.0.1 RAET: Not Installed smmap: Not Installed timelib: Not Installed Tornado: 4.2.1 ZMQ: 4.0.5
System Versions: dist: Ubuntu 14.04 trusty locale: UTF-8 machine: x86_64 release: 4.4.0-137-generic system: Linux version: Ubuntu 14.04 trusty
vagrant@localsandbox:~$
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 21 (10 by maintainers)
Commits related to this issue
- fix InstallRequirement.from_line for pip 18.1 Fixes #49967 — committed to gtmanfred/salt by gtmanfred 6 years ago
- fix InstallRequirement.from_line for pip 18.1 Fixes #49967 — committed to sbrennan4/salt by gtmanfred 6 years ago
- fix InstallRequirement.from_line for pip 18.1 Fixes #49967 — committed to sbrennan4/salt by gtmanfred 6 years ago
- fix InstallRequirement.from_line for pip 18.1 Fixes #49967 — committed to mode/salt by gtmanfred 6 years ago
- fix InstallRequirement.from_line for pip 18.1 Fixes #49967 — committed to mode/salt by gtmanfred 6 years ago
Yup that is what this issue is about, it will be fixed for 2018.3.4, in the mean run downgrade pip to less than 18.1