question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mysterious pip install failure with updated packages

See original GitHub issue

I get a very strange error when trying to install. The error is:

ModuleNotFoundError: No module named 'cffi.setuptools_ext'

This is what I do:

# pip3 install --no-cache-dir cairocffi

Collecting cairocffi
  Downloading https://files.pythonhosted.org/packages/62/be/ad4d422b6f38d99b09ad6d046ab725e8ccac5fefd9ca256ca35a80dbf3c6/cairocffi-0.9.0.tar.gz (84kB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 92kB 1.4MB/s
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-jq4orjvu/cairocffi/setup.py", line 51, in <module>
        'test': ['pytest-runner', 'pytest-cov'],
      File "/usr/lib/python3.6/site-packages/setuptools/__init__.py", line 140, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.6/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/lib/python3.6/site-packages/setuptools/dist.py", line 370, in __init__
        k: v for k, v in attrs.items()
      File "/usr/lib/python3.6/distutils/dist.py", line 281, in __init__
        self.finalize_options()
      File "/usr/lib/python3.6/site-packages/setuptools/dist.py", line 529, in finalize_options
        ep.load()(self, ep.name, value)
      File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2343, in load
        return self.resolve()
      File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2349, in resolve
        module = __import__(self.module_name, fromlist=['__name__'], level=0)
    ModuleNotFoundError: No module named 'cffi.setuptools_ext'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-jq4orjvu/cairocffi/

I’m quite confident I’m using the latest of everything, but it seem that something is missing or perhaps interfering. Please see links below for more details of my installation.


This problem is also tracked here: https://github.com/pygobject/pycairo/issues/135 and here: https://github.com/pyca/bcrypt/issues/157

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
E3V3Acommented, Jan 26, 2019

Today I updated everything and managed to re-install cffi properly with:

pip3 install --no-cache-dir --force-reinstall cffi
pip3 install --no-cache-dir cairocffi

🌞

1reaction
lukashawercommented, Dec 9, 2019

when I try to install cairocffi i got:

C:\WINDOWS\system32>pip3 install --no-cache-dir cairocffi
Collecting cairocffi
  Downloading https://files.pythonhosted.org/packages/f7/99/b3a2c6393563ccbe081ffcceb359ec27a6227792c5169604c1bd8128031a/cairocffi-1.1.0.tar.gz (68kB)
     |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 71kB 1.1MB/s
    ERROR: Command errored out with exit status 1:
     command: 'c:\programdata\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\LUH\\AppData\\Local\\Temp\\pip-install-wxdds8wd\\cairocffi\\setup.py'"'"'; __file__='"'"'C:\\Users\\LUH\\AppData\\Local\\Temp\\pip-install-wxdds8wd\\cairocffi\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\LUH\AppData\Local\Temp\pip-install-wxdds8wd\cairocffi\pip-egg-info'
         cwd: C:\Users\LUH\AppData\Local\Temp\pip-install-wxdds8wd\cairocffi\
    Complete output (25 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\LUH\AppData\Local\Temp\pip-install-wxdds8wd\cairocffi\setup.py", line 13, in <module>
        'cairocffi/ffi_build.py:ffi_pixbuf']
      File "c:\programdata\anaconda3\lib\site-packages\setuptools\__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "c:\programdata\anaconda3\lib\distutils\core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "c:\programdata\anaconda3\lib\site-packages\setuptools\dist.py", line 448, in __init__
        k: v for k, v in attrs.items()
      File "c:\programdata\anaconda3\lib\distutils\dist.py", line 292, in __init__
        self.finalize_options()
      File "c:\programdata\anaconda3\lib\site-packages\setuptools\dist.py", line 740, in finalize_options
        ep.load()(self)
      File "c:\programdata\anaconda3\lib\site-packages\setuptools\dist.py", line 747, in _finalize_setup_keywords
        ep.load()(self, ep.name, value)
      File "C:\Users\LUH\AppData\Roaming\Python\Python37\site-packages\cffi\setuptools_ext.py", line 217, in cffi_modules
        add_cffi_module(dist, cffi_module)
      File "C:\Users\LUH\AppData\Roaming\Python\Python37\site-packages\cffi\setuptools_ext.py", line 49, in add_cffi_module
        execfile(build_file_name, mod_vars)
      File "C:\Users\LUH\AppData\Roaming\Python\Python37\site-packages\cffi\setuptools_ext.py", line 25, in execfile
        exec(code, glob, glob)
      File "cairocffi/ffi_build.py", line 28, in <module>
        ffi.cdef(constants._CAIRO_HEADERS)
    AttributeError: module 'constants' has no attribute '_CAIRO_HEADERS'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Please advice

Read more comments on GitHub >

github_iconTop Results From Across the Web

Strange error when trying to install PIP - Stack Overflow
Trying install PIP. I have python 2.7 installed on Windows 7 (32-bit). I created a file called get-pip.py as instructed here:Β ...
Read more >
How to install modules with PIP (and fix it when it fails) - Medium
Assuming that, the first thing to do is to check if the module exists. The main way to do this is to go...
Read more >
Install TensorFlow with pip
This guide is for the latest stable version of TensorFlow. For the preview build (nightly), use the pip package named tf-nightly . Refer...
Read more >
Troubleshooting - pipx
pipx uses pip to install and manage packages. If you see pipx exhibiting strange behavior on install or upgrade, check that you don't...
Read more >
Installation β€” PyEMMA 2.5.7 documentation
To install the PyEMMA Python package, you need a few Python package dependencies. If these dependencies are not available in their required versions,Β ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found