undefined symbol: __intel_sse2_strcpy - python

I am trying to install phonopy on our super computer's login node following the instruction on under the Building using setup.py section here https://atztogo.github.io/phonopy/install.html.
Basically, just two commands:
tar xvfz phonopy-1.11.2.tar.gz
python setup.py install --user
It installs with no problem; however, when I use it, I get the following errors saying undefined symbol: __intel_sse2_strcpy. Here is the complete error message:
/home/syuan43/.local/bin/bandplot
Traceback (most recent call last):
File "/home/syuan43/.local/bin/bandplot", line 4, in <module>
__import__('pkg_resources').run_script('phonopy==1.11.8.5', 'bandplot')
File "/software/CentOS-6/tools/python-2.7.9/lib/python2.7/site-packages/pkg_resources/__init__.py", line 726, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/software/CentOS-6/tools/python-2.7.9/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1491, in run_script
exec(script_code, namespace, namespace)
File "/home/syuan43/.local/lib/python2.7/site-packages/phonopy-1.11.8.5-py2.7-linux-x86_64.egg/EGG-INFO/scripts/bandplot", line 52, in <module>
File "build/bdist.linux-x86_64/egg/phonopy/__init__.py", line 37, in <module>
File "build/bdist.linux-x86_64/egg/phonopy/api_phonopy.py", line 39, in <module>
File "build/bdist.linux-x86_64/egg/phonopy/structure/symmetry.py", line 37, in <module>
File "build/bdist.linux-x86_64/egg/phonopy/structure/spglib.py", line 35, in <module>
File "build/bdist.linux-x86_64/egg/phonopy/_spglib.py", line 7, in <module>
File "build/bdist.linux-x86_64/egg/phonopy/_spglib.py", line 6, in __bootstrap__
ImportError: /home/syuan43/.python-eggs/phonopy-1.11.8.5-py2.7-linux-x86_64.egg-tmp/phonopy/_spglib.so: undefined symbol: __intel_sse2_strcpy
Not sure if this may help, here is the module that I am using:
$ module list
Currently Loaded Modules:
1) ifort_icc/15.0 2) intel_mpi/5.0.1 3) python/2.7.9
Any idea how to resolve the problem above? Or any suggestions what might be the cause of it?

(Old issue but I'll add an answer for the next me.)
For me it was a compiler issue. Doing:
export CC=gcc
before doing the pip installs fixed this for me.
See also: https://github.com/jswhit/pyproj/issues/76

In my case uninstalling cf_units and installing again worked. I uninstalled cf_units from PIP and installed using anaconda
pip uninstall cf_units
conda install -c conda-forge cf_units

Related

Screwed up pip, getting "ImportError: Entry point ('console_scripts', 'pip') not found"

Somehow I screwed up my install of pip. I can't install anything using pip or even just get the version. When I try getting the version I get the following error:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 8, in <module>
load_entry_point('pip==1.3.1', 'console_scripts', 'pip')()
File "/Library/Python/2.7/site-packages/pkg_resources.py", line 343, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/Library/Python/2.7/site-packages/pkg_resources.py", line 2353, in load_entry_point
raise ImportError("Entry point %r not found" % ((group,name),))
ImportError: Entry point ('console_scripts', 'pip') not found
I found a Stack Overflow post that said I should re-install pip using: python -m pip install --upgrade --force-reinstall pip but when I do that I get:
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named pip
And of course trying to reinstall python using: brew install python gets me:
==> Installing dependencies for python: readline, sqlite, gdbm, makedepend, openssl
==> Installing python dependency: readline
==> Downloading http://ftpmirror.gnu.org/readline/readline-6.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/readline-6.3.8.tar.gz
==> Downloading https://gist.githubusercontent.com/jacknagel/d886531fb6623b60b2af/raw/746fc543e56bc37a26ccf05d2946a45176b0894e/readline-6.3.8.diff
##O=# #
curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "readline--patch"
Download failed: https://gist.githubusercontent.com/jacknagel/d886531fb6623b60b2af/raw/746fc543e56bc37a26ccf05d2946a45176b0894e/readline-6.3.8.diff
I found another Stack Overflow post that said to use the get-pip.py file but doing that
throws the following:
Traceback (most recent call last):
File "get-pip.py", line 23484, in <module>
main()
File "get-pip.py", line 198, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 83, in bootstrap
from pip._internal.commands.install import InstallCommand
File "/tmp/tmpH6zFs7/pip.zip/pip/_internal/commands/install.py", line 24, in <module>
File "/tmp/tmpH6zFs7/pip.zip/pip/_internal/cli/req_command.py", line 16, in <module>
File "/tmp/tmpH6zFs7/pip.zip/pip/_internal/index/package_finder.py", line 21, in <module>
File "/tmp/tmpH6zFs7/pip.zip/pip/_internal/index/collector.py", line 14, in <module>
File "/tmp/tmpH6zFs7/pip.zip/pip/_vendor/requests/__init__.py", line 97, in <module>
File "/tmp/tmpH6zFs7/pip.zip/pip/_vendor/urllib3/contrib/pyopenssl.py", line 46, in <module>
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import crypto, SSL
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/OpenSSL/crypto.py", line 12, in <module>
from cryptography import x509
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/cryptography/x509/__init__.py", line 7, in <module>
from cryptography.x509 import certificate_transparency
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/cryptography/x509/certificate_transparency.py", line 22, in <module>
#six.add_metaclass(abc.ABCMeta)
AttributeError: 'module' object has no attribute 'add_metaclass'
So as you can see I am bit stuck. I'm sure it is something simple that I am missing but I can't figure our what it is. Does anyone know how I can get my pip back & working? At this point I might also be interested in nuking my Python 2.7 install & starting again from scratch if that is possible. Thanks in advance.
__Mikk

No Module Named Extern

I am having real trouble trying to use pip to install pyserial for python 3.5.2, I am trying to install pip using 'sudo easy_install pip'.
I keep getting this error message:
sudo easy_install pip
Traceback (most recent call last):
File "/usr/local/bin/easy_install", line 11, in <module>
load_entry_point('setuptools==29.0.1', 'console_scripts', 'easy_install')()
File"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 565, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2697, in load_entry_point
return ep.load()
File"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2370, in load
return self.resolve()
File"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2376, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "build/bdist.macosx-10.12-intel/egg/setuptools/__init__.py", line 10, in <module>
File "build/bdist.macosx-10.12 intel/egg/setuptools/extern/__init__.py", line 1, in <module>
ImportError: No module named extern
Any Help would be appreciated.
Running sudo easy_install pip will install pip for Python 2, which you don't want if you're using Python 3.
You might have pip installed for Python 3 already (run which pip3 to check). If so, you can install pyserial using pip3
pip3 install pyserial
However, it would be better to use a virtual environment. See the hitchhiker's guide to Python to get started.

Error when using pip to install

Whenever I try to install anything using pip I get the following error:
$ sudo pip install --upgrade pip
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==7.0.3', 'console_scripts', 'pip')()
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 558, in load_entry_point
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2682, in load_entry_point
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2355, in load
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2361, in resolve
File "/usr/local/lib/python2.7/site-packages/pip-7.0.3-py2.7.egg/pip/__init__.py", line 15, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/local/lib/python2.7/site-packages/pip-7.0.3-py2.7.egg/pip/vcs/subversion.py", line 9, in <module>
from pip.index import Link
File "/usr/local/lib/python2.7/site-packages/pip-7.0.3-py2.7.egg/pip/index.py", line 30, in <module>
from pip.wheel import Wheel, wheel_ext
File "/usr/local/lib/python2.7/site-packages/pip-7.0.3-py2.7.egg/pip/wheel.py", line 35, in <module>
from pip._vendor.distlib.scripts import ScriptMaker
File "/usr/local/lib/python2.7/site-packages/pip-7.0.3-py2.7.egg/pip/_vendor/__init__.py", line 92, in load_module
raise ImportError("No module named '%s'" % (name,))
ImportError: No module named 'pip._vendor.distlib.scripts'
This also happens when I try to upgrade pip, install sphinx or basically any install/upgrade option using pip.
I am running Ubuntu 15.10 and using Python 2.7.10
StackOverflow has said this is a duplicate, and that there is a solution at ImportError: No module named 'pip._vendor.distlib.scripts' when I try to install fabric by python pip however the recommend solution on this post is not actually a soltuion. It does not solve my issue, nor does it appear to solve the original posters problem.
Try this:
sudo pip install --upgrade --no-use-wheel pip

Error in running a python script-In pip installation

I am running a python script where it is setting up an environment in unix to run other python scripts. It is trying to install pip and it fails with the following error.
2016-01-25 12:05:50,291 - Checking if pip is installed.
2016-01-25 12:05:50,291 - Pip is not currently installed.
2016-01-25 12:05:50,291 - Installing pip.
Traceback (most recent call last):
File "/tmp/tmpoDUDVr.py", line 19017, in <module>
main()
File "/tmp/tmpoDUDVr.py", line 194, in main
bootstrap(tmpdir=tmpdir)
File "/tmp/tmpoDUDVr.py", line 82, in bootstrap
import pip
File "/tmp/tmpm4FmfJ/pip.zip/pip/__init__.py", line 15, in <module>
File "/tmp/tmpm4FmfJ/pip.zip/pip/vcs/subversion.py", line 9, in <module>
File "/tmp/tmpm4FmfJ/pip.zip/pip/index.py", line 29, in <module>
File "/tmp/tmpm4FmfJ/pip.zip/pip/wheel.py", line 39, in <module>
File "/tmp/tmpm4FmfJ/pip.zip/pip/_vendor/distlib/scripts.py", line 14, in <module>
File "/tmp/tmpm4FmfJ/pip.zip/pip/_vendor/distlib/compat.py", line 31, in <module>
ImportError: cannot import name HTTPSHandler
Failed to install pip. Error was Command '['python', '/tmp/tmpoDUDVr.py', '- -user', '--upgrade', '--force-reinstall']' returned non-zero exit status 1
I have already installed pip using the command yum -y install python-pip but still it throws this error. I am not able to find this tmp/tmpoDUDVr.py file and everytime I run this tmp file varies.I tried searching hidden files too(ls -a) Could you please shed light? Any thoughts much appreciated..
Try to use "sudo" in this case. PIP was installed the first time as root...

ImportError while installing pip in virtualenv

I have a rhel machine with python2.6 installed on it. I've been trying to have an alternate install of python2.7 and set up a virtualenv for using 2.7. I installed python2.7 by building from source as follows:
./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
make && make altinstall
I already had virtualenv installed on the system so I used it to create a venv for 2.7 as follows:
virtualenv -p python2.7 --no-setuptools py27
. py27/bin/activate
Now when I try to install pip inside the venv, it fails like so:
python get-pip.py
Traceback (most recent call last):
File "get-pip.py", line 19857, in <module>
main()
File "get-pip.py", line 151, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 81, in bootstrap
import pip
File "/tmp/tmpArPs31/pip.zip/pip/__init__.py", line 15, in <module>
File "/tmp/tmpArPs31/pip.zip/pip/vcs/mercurial.py", line 11, in <module>
File "/tmp/tmpArPs31/pip.zip/pip/download.py", line 29, in <module>
File "/tmp/tmpArPs31/pip.zip/pip/_vendor/__init__.py", line 81, in load_module
ImportError: No module named 'pip._vendor.requests'
Can't figure out what's going wrong here. Please help.
I've installed python 2.7.8.
EDIT: I initially tried creating virtualenv without --no-setuptools option but that gave me the same error:
virtualenv -p python2.7 py27_with_pip
Running virtualenv with interpreter /usr/local/bin/python2.7
New python executable in py27_with_pip/bin/python2.7
Also creating executable in py27_with_pip/bin/python
Installing setuptools, pip...
Complete output from command /data1/home/sagraw1/...th_pip/bin/python2.7 -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.6/site-packages/virtualenv-12.0-py2.6.egg/virtualenv_support/pip-6.0- py2.py3-none-any.whl/pip/__init__.py", line 15, in <module>
File "/usr/lib/python2.6/site-packages/virtualenv-12.0-py2.6.egg/virtualenv_support/pip-6.0-py2.py3-none-any.whl/pip/vcs/mercurial.py", line 11, in <module>
File "/usr/lib/python2.6/site-packages/virtualenv-12.0-py2.6.egg/virtualenv_support/pip-6.0-py2.py3-none-any.whl/pip/download.py", line 29, in <module>
File "/usr/lib/python2.6/site-packages/virtualenv-12.0-py2.6.egg/virtualenv_support/pip-6.0-py2.py3-none-any.whl/pip/_vendor/__init__.py", line 81, in load_module
ImportError: No module named 'pip._vendor.requests'
----------------------------------------
...Installing setuptools, pip...done.
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/virtualenv-12.0-py2.6.egg/virtualenv.py", line 2363, in <module>
main()
File "/usr/lib/python2.6/site-packages/virtualenv-12.0-py2.6.egg/virtualenv.py", line 848, in main
symlink=options.symlink)
File "/usr/lib/python2.6/site-packages/virtualenv-12.0-py2.6.egg/virtualenv.py", line 1016, in create_environment
install_wheel(to_install, py_executable, search_dirs)
File "/usr/lib/python2.6/site-packages/virtualenv-12.0-py2.6.egg/virtualenv.py", line 984, in install_wheel
'PIP_NO_INDEX': '1'
File "/usr/lib/python2.6/site-packages/virtualenv-12.0-py2.6.egg/virtualenv.py", line 926, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /data1/home/sagraw1/...th_pip/bin/python2.7 -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip failed with error code 1
I tried installing pip with python2.7 directly but even that doesn't work:
python2.7 get-pip.py
Traceback (most recent call last):
File "get-pip.py", line 19857, in <module>
main()
File "get-pip.py", line 151, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 81, in bootstrap
import pip
File "/tmp/tmpPSVEkk/pip.zip/pip/__init__.py", line 15, in <module>
File "/tmp/tmpPSVEkk/pip.zip/pip/vcs/mercurial.py", line 11, in <module>
File "/tmp/tmpPSVEkk/pip.zip/pip/download.py", line 29, in <module>
File "/tmp/tmpPSVEkk/pip.zip/pip/_vendor/__init__.py", line 81, in load_module
ImportError: No module named 'pip._vendor.requests'
I was in a situation similar to yours, and I eventually found the fix. At least in my case the root problem was that when I compiled python 2.7.8 the build process didn't find the proper OpenSSL libraries (because they were not installed on my system). After make finished running it showed a summary similar to this:
Failed to find the necessary bits to build these modules:
_bsddb _curses _curses_panel
_hashlib _sqlite3 _ssl
This doesn't prevent make install from working, and after that Python works just fine, except that it can't access https URLs and other related functionality. You can tell if this is your case by starting python and then typing
import ssl
If you see an ImportError, then the ssl module is missing. Otherwise, you see no message at all.
I fixed this by installing the OpenSSL libraries by running (as root):
yum install openssl-devel
After this was in place, I rebuilt Python with make (now _ssl was not listed as missing), followed by make install. After this, running get-pip.py worked without a hitch.
Hope this helps!

Categories