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

cffi ImportError during installation of v0.21.0 #380

Closed
cvrebert opened this issue Jul 1, 2014 · 8 comments
Closed

cffi ImportError during installation of v0.21.0 #380

cvrebert opened this issue Jul 1, 2014 · 8 comments

Comments

@cvrebert
Copy link
Contributor

cvrebert commented Jul 1, 2014

$ uname -a
Darwin MACBOX.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun  3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
$ python -V
Python 2.7.7
$ pip -V
pip 1.5.6 from /Users/chris.rebert/envs/restfulgit/lib/python2.7/site-packages (python 2.7)
$ pip install pygit2
Downloading/unpacking pygit2
  Downloading pygit2-0.21.0.tar.gz (unknown size): 150kB downloaded
  Running setup.py (path:/Users/chris.rebert/envs/restfulgit/build/pygit2/setup.py) egg_info for package pygit2
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/Users/chris.rebert/envs/restfulgit/build/pygit2/setup.py", line 178, in <module>
        from ffi import ffi
      File "pygit2/ffi.py", line 34, in <module>
        from cffi import FFI
    ImportError: No module named cffi
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/Users/chris.rebert/envs/restfulgit/build/pygit2/setup.py", line 178, in <module>

    from ffi import ffi

  File "pygit2/ffi.py", line 34, in <module>

    from cffi import FFI

ImportError: No module named cffi

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /Users/chris.rebert/envs/restfulgit/build/pygit2
Storing debug log for failure in /Users/chris.rebert/.pip/pip.log
$ # Okay, maybe if I install cffi manually beforehand?
$ pip install cffi
<installation of cffi succeeds>
$ pip install pygit2
Downloading/unpacking pygit2
  Downloading pygit2-0.21.0.tar.gz (unknown size): 150kB downloaded
  Running setup.py (path:/Users/chris.rebert/envs/restfulgit/build/pygit2/setup.py) egg_info for package pygit2

Requirement already satisfied (use --upgrade to upgrade): cffi in /Users/chris.rebert/envs/restfulgit/lib/python2.7/site-packages (from pygit2)
Requirement already satisfied (use --upgrade to upgrade): pycparser in /Users/chris.rebert/envs/restfulgit/lib/python2.7/site-packages (from cffi->pygit2)
Installing collected packages: pygit2
  Running setup.py install for pygit2
    building '_pygit2' extension
<snip>
<the pygit2 installation succeeds this time>
cvrebert added a commit to hulu/restfulgit that referenced this issue Jul 1, 2014
cvrebert added a commit to hulu/restfulgit that referenced this issue Jul 1, 2014
cvrebert added a commit to hulu/restfulgit that referenced this issue Jul 1, 2014
@jdavid
Copy link
Member

jdavid commented Jul 1, 2014

Just updated the README file so it reads:

$ pip install cffi
$ pip install pygit2

Though, pip install pygit2 should just work.

@carlosmn
Copy link
Member

carlosmn commented Jul 3, 2014

Indeed, setup.py includes cffi as a dependency, and the output there seems to want to install it, but only after installing pygit2, which seems quite odd.

Perhaps it wants a version specification, something like ['cffi>=0.8'] instead of just ['cffi']?

@jdavid
Copy link
Member

jdavid commented Jul 3, 2014

The error message is the same when you just run python setup.py install in an environment without cffi. Loading setup.py just fails because the import cffi comes before the call to setup. There is an option setup_requires, not clear it will make a difference. Anyway for testing this before releasing we will need to use something like pypiserver.

@carlosmn
Copy link
Member

This should be fixed with #407, correct?

@roncohen
Copy link
Contributor

I would think so yes. I haven't experienced it since.

@DavidJFelix
Copy link

I'm currently getting this issue in travis.

@remexre
Copy link

remexre commented Oct 28, 2015

I'm getting this issue as well.

@jdavid
Copy link
Member

jdavid commented Oct 28, 2015

This should be fixed by commit 203335b, we will see with the next release.

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

6 participants