Hello,
I want to install some additional packages for Python3 (e.g., NumPy, xmltodict, argparse, etc) on opensuse 13.2
I run
pip3 install numpy
This ends up with an error
"Cannot compile 'Python.h'. Perhaps you need to "
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
Indeed, the devel package for Python3 is not installed. I attempt to change this:
>zypper in python3-devel
The following NEW package is going to be installed:
python3-devel
The following 2 packages are going to be upgraded:
python3 python3-base
2 packages to upgrade, 1 new.
Overall download size: 6.6 MiB. Already cached: 0 B After the operation, additional 1.1 MiB will be used.
Continue? [y/n/? shows all options] (y): y
(1/3) Installing: python3-base-3.4.5-4.4.1 .............................................................................................................................................[done]
(2/3) Installing: python3-devel-3.4.5-4.4.1 ............................................................................................................................................[done]
(3/3) Installing: python3-3.4.5-4.4.1 ..................................................................................................................................................[done]
Done!
Finally, I restart the installation with pip3:
>pip3 install numpy
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
load_entry_point('pip==1.5.6', 'console_scripts', 'pip3')()
File "/usr/lib/python3.4/site-packages/pkg_resources.py", line 356, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3.4/site-packages/pkg_resources.py", line 2431, in load_entry_point
return ep.load()
File "/usr/lib/python3.4/site-packages/pkg_resources.py", line 2147, in load
'__name__'])
File "/usr/lib/python3.4/site-packages/pip/__init__.py", line 9, in <module>
from pip.log import logger
File "/usr/lib/python3.4/site-packages/pip/log.py", line 8, in <module>
from pip import backwardcompat
File "/usr/lib/python3.4/site-packages/pip/backwardcompat/__init__.py", line 39, in <module>
import xmlrpc.client as xmlrpclib
File "/usr/lib64/python3.4/xmlrpc/client.py", line 137, in <module>
from xml.parsers import expat
File "/usr/lib64/python3.4/xml/parsers/expat.py", line 4, in <module>
from pyexpat import *
ImportError: /usr/lib64/python3.4/lib-dynload/pyexpat.cpython-34m.so: undefined symbol: _PyTraceback_Add
I have reproduced this error on three different machines - two PCs running opensuse 13.2 and one laptop running opensuse 12.x.
Reinstalling python3 with yast does not help. Compiling packages from sources without pip does not help either - I still get some “expat”-related error
Please suggest a workaround.
Thank you for your time.