Error install pip #484

Closed
opened 2025-12-29 16:22:35 +01:00 by adam · 1 comment
Owner

Originally created by @galaxydata on GitHub (Oct 25, 2016).

When installing netbox, got error

I am install

pip install cffi==1.7.0

then
pip install --upgrade -r /opt/netbox/requirements.txt

My OS: Debian 8.6
uname -r
3.16.0-4-amd64

Error:

` Found existing installation: cryptography 0.6.1
Not uninstalling cryptography at /usr/lib/python2.7/dist-packages, owned by OS
Running setup.py install for cryptography

Installed /tmp/pip-build-TzfJRr/cryptography/cffi-1.8.3-py2.7-linux-x86_64.egg
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-build-TzfJRr/cryptography/setup.py", line 333, in <module>
    **keywords_with_side_effects(sys.argv)
  File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 266, in __init__
    _Distribution.__init__(self,attrs)
  File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
    self.finalize_options()
  File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 301, in finalize_options
    ep.load()(self, ep.name, value)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2190, in load
    ['__name__'])
ImportError: No module named setuptools_ext
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-TzfJRr/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-6k0T4V-record/install-record.txt --single-version-externally-managed --compile:

Installed /tmp/pip-build-TzfJRr/cryptography/cffi-1.8.3-py2.7-linux-x86_64.egg

Traceback (most recent call last):

File "", line 1, in

File "/tmp/pip-build-TzfJRr/cryptography/setup.py", line 333, in

**keywords_with_side_effects(sys.argv)

File "/usr/lib/python2.7/distutils/core.py", line 111, in setup

_setup_distribution = dist = klass(attrs)

File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 266, in init

_Distribution.__init__(self,attrs)

File "/usr/lib/python2.7/distutils/dist.py", line 287, in init

self.finalize_options()

File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 301, in finalize_options

ep.load()(self, ep.name, value)

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2190, in load

['__name__'])

ImportError: No module named setuptools_ext


Can't roll back cryptography; was not uninstalled
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-TzfJRr/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-6k0T4V-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-TzfJRr/cryptography
Storing debug log for failure in /root/.pip/pip.log`

Originally created by @galaxydata on GitHub (Oct 25, 2016). **When installing netbox, got error** I am install pip install cffi==1.7.0 then pip install --upgrade -r /opt/netbox/requirements.txt My OS: Debian 8.6 uname -r 3.16.0-4-amd64 **Error:** ` Found existing installation: cryptography 0.6.1 Not uninstalling cryptography at /usr/lib/python2.7/dist-packages, owned by OS Running setup.py install for cryptography ``` Installed /tmp/pip-build-TzfJRr/cryptography/cffi-1.8.3-py2.7-linux-x86_64.egg Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-TzfJRr/cryptography/setup.py", line 333, in <module> **keywords_with_side_effects(sys.argv) File "/usr/lib/python2.7/distutils/core.py", line 111, in setup _setup_distribution = dist = klass(attrs) File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 266, in __init__ _Distribution.__init__(self,attrs) File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__ self.finalize_options() File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 301, in finalize_options ep.load()(self, ep.name, value) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2190, in load ['__name__']) ImportError: No module named setuptools_ext Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-TzfJRr/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-6k0T4V-record/install-record.txt --single-version-externally-managed --compile: ``` Installed /tmp/pip-build-TzfJRr/cryptography/cffi-1.8.3-py2.7-linux-x86_64.egg Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-TzfJRr/cryptography/setup.py", line 333, in <module> ``` **keywords_with_side_effects(sys.argv) ``` File "/usr/lib/python2.7/distutils/core.py", line 111, in setup ``` _setup_distribution = dist = klass(attrs) ``` File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 266, in **init** ``` _Distribution.__init__(self,attrs) ``` File "/usr/lib/python2.7/distutils/dist.py", line 287, in **init** ``` self.finalize_options() ``` File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 301, in finalize_options ``` ep.load()(self, ep.name, value) ``` File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2190, in load ``` ['__name__']) ``` ImportError: No module named setuptools_ext --- Can't roll back cryptography; was not uninstalled Cleaning up... Command /usr/bin/python -c "import setuptools, tokenize;**file**='/tmp/pip-build-TzfJRr/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(**file**).read().replace('\r\n', '\n'), **file**, 'exec'))" install --record /tmp/pip-6k0T4V-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-TzfJRr/cryptography Storing debug log for failure in /root/.pip/pip.log`
adam closed this issue 2025-12-29 16:22:35 +01:00
Author
Owner

@michaelmangold commented on GitHub (Oct 25, 2016):

Found existing installation: cryptography 0.6.1
Not uninstalling cryptography at /usr/lib/python2.7/dist-packages, owned by OS

Is the correct tip. you have to uninstall the debian package
apt-get uninstall python-cryptography
then run again the command
pip install --upgrade -r /opt/netbox/requirements.txt

@michaelmangold commented on GitHub (Oct 25, 2016): > Found existing installation: cryptography 0.6.1 > Not uninstalling cryptography at /usr/lib/python2.7/dist-packages, owned by OS Is the correct tip. you have to uninstall the debian package `apt-get uninstall python-cryptography` then run again the command `pip install --upgrade -r /opt/netbox/requirements.txt`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#484