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

Pip error on install (python 2.6) #2341

Closed
kjav opened this issue Sep 15, 2015 · 4 comments
Closed

Pip error on install (python 2.6) #2341

kjav opened this issue Sep 15, 2015 · 4 comments

Comments

@kjav
Copy link
Contributor

kjav commented Sep 15, 2015

Hi,

I was trying to install the latest version of cryptography on a build machine that doesn't currently have cryptography installed, and received an error that I can't understand. I installed the libffi-devel package from yum before running pip install cryptography.

What does this error mean, and how can I fix it?

Running setup.py develop for cryptography
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-build/cryptography/setup.py", line 313, in <module>
    **keywords_with_side_effects(sys.argv)
  File "/usr/lib64/python2.6/distutils/core.py", line 113, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib64/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/dist.py", line 223, in __init__
  File "/usr/lib64/python2.6/distutils/dist.py", line 270, in __init__
    self.finalize_options()
  File "/usr/lib64/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/dist.py", line 256, in finalize_options
  File "/usr/lib64/python2.6/site-packages/cffi/setuptools_ext.py", line 161, in cffi_modules
    add_cffi_module(dist, cffi_module)
  File "/usr/lib64/python2.6/site-packages/cffi/setuptools_ext.py", line 48, in add_cffi_module
    execfile(build_file_name, mod_vars)
  File "/usr/lib64/python2.6/site-packages/cffi/setuptools_ext.py", line 24, in execfile
    exec(code, glob, glob)
  File "src/_cffi_src/build_openssl.py", line 95, in <module>
    extra_link_args=extra_link_args(sys.platform),
  File "/tmp/pip-build/cryptography/src/_cffi_src/utils.py", line 62, in build_ffi_for_binding
    extra_link_args=extra_link_args,
  File "/tmp/pip-build/cryptography/src/_cffi_src/utils.py", line 71, in build_ffi
    ffi.cdef(cdef_source)
  File "/usr/lib64/python2.6/site-packages/cffi/api.py", line 107, in cdef
    self._parser.parse(csource, override=override, packed=packed)
  File "/usr/lib64/python2.6/site-packages/cffi/cparser.py", line 171, in parse
    self._internal_parse(csource)
  File "/usr/lib64/python2.6/site-packages/cffi/cparser.py", line 177, in _internal_parse
    ast, macros, csource = self._parse(csource)
  File "/usr/lib64/python2.6/site-packages/cffi/cparser.py", line 134, in _parse
    self.convert_pycparser_error(e, csource)
  File "/usr/lib64/python2.6/site-packages/cffi/cparser.py", line 163, in convert_pycparser_error
    raise api.CDefError(msg)
cffi.api.CDefError: cannot parse "__dotdotdot__ ;"
:10: Anonymous field of invalid type
Complete output from command /usr/bin/python -c "import setuptools; __file__='/tmp/pip-build/cryptography/setup.py'; exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" develop --no-deps:
Traceback (most recent call last):

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

  File "/tmp/pip-build/cryptography/setup.py", line 313, in <module>

**keywords_with_side_effects(sys.argv)

 File "/usr/lib64/python2.6/distutils/core.py", line 113, in setup

_setup_distribution = dist = klass(attrs)

File "/usr/lib64/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/dist.py", line 223, in __init__

File "/usr/lib64/python2.6/distutils/dist.py", line 270, in __init__

self.finalize_options()

 File "/usr/lib64/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/dist.py", line 256, in finalize_options

 File "/usr/lib64/python2.6/site-packages/cffi/setuptools_ext.py", line 161, in cffi_modules

add_cffi_module(dist, cffi_module)

File "/usr/lib64/python2.6/site-packages/cffi/setuptools_ext.py", line 48, in add_cffi_module

execfile(build_file_name, mod_vars)

File "/usr/lib64/python2.6/site-packages/cffi/setuptools_ext.py", line 24, in execfile

exec(code, glob, glob)

File "src/_cffi_src/build_openssl.py", line 95, in <module>

extra_link_args=extra_link_args(sys.platform),

File "/tmp/pip-build/cryptography/src/_cffi_src/utils.py", line 62, in build_ffi_for_binding

extra_link_args=extra_link_args,

File "/tmp/pip-build/cryptography/src/_cffi_src/utils.py", line 71, in build_ffi

ffi.cdef(cdef_source)

File "/usr/lib64/python2.6/site-packages/cffi/api.py", line 107, in cdef

self._parser.parse(csource, override=override, packed=packed)

File "/usr/lib64/python2.6/site-packages/cffi/cparser.py", line 171, in parse

self._internal_parse(csource)

File "/usr/lib64/python2.6/site-packages/cffi/cparser.py", line 177, in _internal_parse

ast, macros, csource = self._parse(csource)

File "/usr/lib64/python2.6/site-packages/cffi/cparser.py", line 134, in _parse

self.convert_pycparser_error(e, csource)

File "/usr/lib64/python2.6/site-packages/cffi/cparser.py", line 163, in convert_pycparser_error

raise api.CDefError(msg)

cffi.api.CDefError: cannot parse "__dotdotdot__ ;"

:10: Anonymous field of invalid type

----------------------------------------
Command /usr/bin/python -c "import setuptools; __file__='/tmp/pip-build/cryptography/setup.py'; exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" develop --no-deps failed with error code 1 in /tmp/pip-build/cryptography

Thanks very much

@kjav kjav changed the title Undecipherable pip error Pip error on install (python 2.6) Sep 15, 2015
@reaperhulk
Copy link
Member

Could you show us the output of a pip freeze? This looks like a problem with cffi, but I'm unsure why.

@kjav
Copy link
Contributor Author

kjav commented Sep 15, 2015

Yep! Thanks for the reply.

$ pip-2.6 freeze
CherryPy==3.7.0
Cython==0.19.1
Flask==0.9
Jinja2==2.6
M2Crypto==0.20.2
PyMySQL==0.6.2
Werkzeug==0.8.3
argparse==1.3.0
awscli==1.7.25
bcdoc==0.14.0
botocore==0.106.0
cffi==1.2.1
colorama==0.3.3
coverage==3.5.2
docopt==0.6.2
docutils==0.12
enum34==1.0.4
ethtool==0.2
fuzzywuzzy==0.1
glusterfs-api==3.6.0.29
idna==2.0
include-server==3.1
iniparse==0.3.1
iotop==0.3.2
ipaddress==1.0.14
iwlib==1.0
jmespath==0.7.1
lettuce==0.2.11
lxml==2.2.3
mock==1.0.1
netaddr==0.7.12
ordereddict==1.1
peewee==2.2.4
pep8==1.5.7
pexpect==2.3
ply==3.4
pyOpenSSL==0.10
pyasn1==0.1.8
pychecker==0.8.19
pycparser==2.04
pycurl==7.19.0
pygpgme==0.1
pyinotify==0.9.4
pypyodbc==1.1.1
python-dateutil==2.4.2
python-dmidecode==3.10.12
requests==2.5.1
rhnlib==2.5.22
rsa==3.1.4
simplejson==3.3.0
six==1.9.0
sure==1.1.4
unittest2==0.5.1
urlgrabber==3.9.1
yum-metadata-parser==1.1.2

@reaperhulk
Copy link
Member

Definitely the right version of cffi. Would you mind upgrading your pycparser to 2.14 (the latest) to see if that resolves the issue?

@kjav
Copy link
Contributor Author

kjav commented Sep 15, 2015

Successfully installed cryptography

That fixed the issue. Thank you so much!

@kjav kjav closed this as completed Sep 15, 2015
@openstep
Copy link

openstep commented Nov 2, 2015

hi
I am installing gwm on ubuntu 14, but with this error:
Command "/opt/ganeti_webmgr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-AIO9dh/pycrypto/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-49UApl-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/ganeti_webmgr/include/site/python2.7/pycrypto" failed with error code 1 in /tmp/pip-build-AIO9dh/pycrypto

root@ganetiwebmanager:/home/csaba/ganeti_webmgr-0.11.1# pip freeze
Landscape-Client==14.12
PAM==0.4.2
Twisted-Core==13.2.0
apt-xapian-index==0.45
argparse==1.2.1
chardet==2.0.1
colorama==0.2.5
configobj==4.7.2
html5lib==0.999
pyOpenSSL==0.13
pycryptopp==0.6.0.1206569328141510525648634803928199668821045408958
pyserial==2.6
python-apt==0.9.3.5ubuntu1
python-debian==0.1.21-nmu2ubuntu2
requests==2.2.1
six==1.5.2
ssh-import-id==3.21
urllib3==1.7.1
virtualenv==1.11.4
wheel==0.24.0
wsgiref==0.1.2
zope.interface==4.0.5

aby ideas?
thx

tdooner added a commit to tdooner/cfapi that referenced this issue Nov 22, 2017
The 1.1.something version doesn't build for me, with this error:

pyca/cryptography#2341
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants