Can't install python package with c #218

Closed
magician333 opened this Issue Apr 18, 2016 · 7 comments

Comments

Projects
None yet
2 participants
@magician333

magician333 commented Apr 18, 2016

if i use pip install python package which include C (such as lxml , misaka ) , it will wrong. By the way ,I installed gcc and python-dev

@fornwall

This comment has been minimized.

Show comment
Hide comment
@fornwall

fornwall Apr 18, 2016

Contributor

For lxml you add libxml2-dev and libxslt-dev, so the full list of dependencies to install should be:

apt install clang libxml2-dev libxslt-dev python-dev

After that you should be able to pip install lxml - show me the error message if this does not work for you!

Contributor

fornwall commented Apr 18, 2016

For lxml you add libxml2-dev and libxslt-dev, so the full list of dependencies to install should be:

apt install clang libxml2-dev libxslt-dev python-dev

After that you should be able to pip install lxml - show me the error message if this does not work for you!

@fornwall

This comment has been minimized.

Show comment
Hide comment
@fornwall

fornwall Apr 18, 2016

Contributor

Install the dependency (for cffi, which misaka depends on):

apt install libffi-dev

and finally install misaka with:

pip install --upgrade --force-reinstall misaka

where --upgrade --force-reinstall forces rebuilds of packages that you may have builkt with older gcc versions. Let me know if this works for you!

Contributor

fornwall commented Apr 18, 2016

Install the dependency (for cffi, which misaka depends on):

apt install libffi-dev

and finally install misaka with:

pip install --upgrade --force-reinstall misaka

where --upgrade --force-reinstall forces rebuilds of packages that you may have builkt with older gcc versions. Let me know if this works for you!

@magician333

This comment has been minimized.

Show comment
Hide comment
@magician333

magician333 Apr 19, 2016

@fornwall Still can't this is response message

Installed /data/data/com.termux/files/usr/tmp/pip-build-p7kbv_ef/misaka/.eggs/cffi-1.5.2-py3.5-linux-aarch64.egg
Searching for pycparser
Reading https://pypi.python.org/simple/pycparser/
Best match: pycparser 2.14
Downloading https://pypi.python.org/packages/source/p/pycparser/pycparser-2.14.tar.gz#md5=a2bc8d28c923b4fe2b2c3b4b51a4f935
Processing pycparser-2.14.tar.gz
Writing /data/data/com.termux/files/usr/tmp/easy_install-pv94m74k/pycparser-2.14/setup.cfg
Running pycparser-2.14/setup.py -q bdist_egg --dist-dir /data/data/com.termux/files/usr/tmp/easy_install-pv94m74k/pycparser-2.14/egg-dist-tmp-ryhgcdb6
warning: no previously-included files matching 'yacctab.' found under directory 'tests'
warning: no previously-included files matching 'lextab.
' found under directory 'tests'
warning: no previously-included files matching 'yacctab.' found under directory 'examples'
warning: no previously-included files matching 'lextab.
' found under directory 'examples'
zip_safe flag not set; analyzing archive contents...
Moving pycparser-2.14-py3.5.egg to /data/data/com.termux/files/usr/tmp/pip-build-p7kbv_ef/misaka/.eggs

Installed /data/data/com.termux/files/usr/tmp/pip-build-p7kbv_ef/misaka/.eggs/pycparser-2.14-py3.5.egg
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/data/data/com.termux/files/usr/tmp/pip-build-p7kbv_ef/misaka/setup.py", line 68, in <module>
    cffi_modules=['build_ffi.py:ffi'],
  File "/data/data/com.termux/files/usr/lib/python3.5/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/data/data/com.termux/files/usr/lib/python3.5/site-packages/setuptools/dist.py", line 272, in __init__
    _Distribution.__init__(self,attrs)
  File "/data/data/com.termux/files/usr/lib/python3.5/distutils/dist.py", line 281, in __init__
    self.finalize_options()
  File "/data/data/com.termux/files/usr/lib/python3.5/site-packages/setuptools/dist.py", line 327, in finalize_options
    ep.load()(self, ep.name, value)
  File "/data/data/com.termux/files/usr/tmp/pip-build-p7kbv_ef/misaka/.eggs/cffi-1.5.2-py3.5-linux-aarch64.egg/cffi/setuptools_ext.py", line 161, in cffi_modules
    add_cffi_module(dist, cffi_module)
  File "/data/data/com.termux/files/usr/tmp/pip-build-p7kbv_ef/misaka/.eggs/cffi-1.5.2-py3.5-linux-aarch64.egg/cffi/setuptools_ext.py", line 48, in add_cffi_module
    execfile(build_file_name, mod_vars)
  File "/data/data/com.termux/files/usr/tmp/pip-build-p7kbv_ef/misaka/.eggs/cffi-1.5.2-py3.5-linux-aarch64.egg/cffi/setuptools_ext.py", line 24, in execfile
    exec(code, glob, glob)
  File "build_ffi.py", line 51, in <module>
    ffi = cffi.FFI()
  File "/data/data/com.termux/files/usr/tmp/pip-build-p7kbv_ef/misaka/.eggs/cffi-1.5.2-py3.5-linux-aarch64.egg/cffi/api.py", line 56, in __init__
    import _cffi_backend as backend
ImportError: dlopen failed: unknown reloc type 17 @ 0x4120f350 (442)

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /data/data/com.termux/files/usr/tmp/pip-build-p7kbv_ef/misaka/

@fornwall Still can't this is response message

Installed /data/data/com.termux/files/usr/tmp/pip-build-p7kbv_ef/misaka/.eggs/cffi-1.5.2-py3.5-linux-aarch64.egg
Searching for pycparser
Reading https://pypi.python.org/simple/pycparser/
Best match: pycparser 2.14
Downloading https://pypi.python.org/packages/source/p/pycparser/pycparser-2.14.tar.gz#md5=a2bc8d28c923b4fe2b2c3b4b51a4f935
Processing pycparser-2.14.tar.gz
Writing /data/data/com.termux/files/usr/tmp/easy_install-pv94m74k/pycparser-2.14/setup.cfg
Running pycparser-2.14/setup.py -q bdist_egg --dist-dir /data/data/com.termux/files/usr/tmp/easy_install-pv94m74k/pycparser-2.14/egg-dist-tmp-ryhgcdb6
warning: no previously-included files matching 'yacctab.' found under directory 'tests'
warning: no previously-included files matching 'lextab.
' found under directory 'tests'
warning: no previously-included files matching 'yacctab.' found under directory 'examples'
warning: no previously-included files matching 'lextab.
' found under directory 'examples'
zip_safe flag not set; analyzing archive contents...
Moving pycparser-2.14-py3.5.egg to /data/data/com.termux/files/usr/tmp/pip-build-p7kbv_ef/misaka/.eggs

Installed /data/data/com.termux/files/usr/tmp/pip-build-p7kbv_ef/misaka/.eggs/pycparser-2.14-py3.5.egg
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/data/data/com.termux/files/usr/tmp/pip-build-p7kbv_ef/misaka/setup.py", line 68, in <module>
    cffi_modules=['build_ffi.py:ffi'],
  File "/data/data/com.termux/files/usr/lib/python3.5/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/data/data/com.termux/files/usr/lib/python3.5/site-packages/setuptools/dist.py", line 272, in __init__
    _Distribution.__init__(self,attrs)
  File "/data/data/com.termux/files/usr/lib/python3.5/distutils/dist.py", line 281, in __init__
    self.finalize_options()
  File "/data/data/com.termux/files/usr/lib/python3.5/site-packages/setuptools/dist.py", line 327, in finalize_options
    ep.load()(self, ep.name, value)
  File "/data/data/com.termux/files/usr/tmp/pip-build-p7kbv_ef/misaka/.eggs/cffi-1.5.2-py3.5-linux-aarch64.egg/cffi/setuptools_ext.py", line 161, in cffi_modules
    add_cffi_module(dist, cffi_module)
  File "/data/data/com.termux/files/usr/tmp/pip-build-p7kbv_ef/misaka/.eggs/cffi-1.5.2-py3.5-linux-aarch64.egg/cffi/setuptools_ext.py", line 48, in add_cffi_module
    execfile(build_file_name, mod_vars)
  File "/data/data/com.termux/files/usr/tmp/pip-build-p7kbv_ef/misaka/.eggs/cffi-1.5.2-py3.5-linux-aarch64.egg/cffi/setuptools_ext.py", line 24, in execfile
    exec(code, glob, glob)
  File "build_ffi.py", line 51, in <module>
    ffi = cffi.FFI()
  File "/data/data/com.termux/files/usr/tmp/pip-build-p7kbv_ef/misaka/.eggs/cffi-1.5.2-py3.5-linux-aarch64.egg/cffi/api.py", line 56, in __init__
    import _cffi_backend as backend
ImportError: dlopen failed: unknown reloc type 17 @ 0x4120f350 (442)

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /data/data/com.termux/files/usr/tmp/pip-build-p7kbv_ef/misaka/

@fornwall

This comment has been minimized.

Show comment
Hide comment
@fornwall

fornwall Apr 19, 2016

Contributor

@magician333 Ok, can you double-check that you have the right gcc version by running apt-cache show gcc | grep Version and verify that the output is Version: 5.3.0-2?

Can you also try to reinstall cffi:

pip uninstall cffi
pip install cffi

and then try to install misaka again?

Contributor

fornwall commented Apr 19, 2016

@magician333 Ok, can you double-check that you have the right gcc version by running apt-cache show gcc | grep Version and verify that the output is Version: 5.3.0-2?

Can you also try to reinstall cffi:

pip uninstall cffi
pip install cffi

and then try to install misaka again?

@magician333

This comment has been minimized.

Show comment
Hide comment
@magician333

magician333 Apr 20, 2016

@fornwall Thanks a lot, I already installed,I'll close this issue

@fornwall Thanks a lot, I already installed,I'll close this issue

@magician333 magician333 reopened this May 5, 2016

@magician333

This comment has been minimized.

Show comment
Hide comment
@magician333

magician333 May 5, 2016

eee,@fornwall And another thing ,I install gevent for python also failed,How to do?

eee,@fornwall And another thing ,I install gevent for python also failed,How to do?

@fornwall

This comment has been minimized.

Show comment
Hide comment
@fornwall

fornwall May 26, 2016

Contributor

Closed as part of #283.

Contributor

fornwall commented May 26, 2016

Closed as part of #283.

@fornwall fornwall closed this May 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment