PIP Install Error
ash-4.3# curl -k https://bootstrap.pypa.io/get-pip.py | python
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1487k 100 1487k 0 0 1336k 0 0:00:01 0:00:01 --:--:-- 1337k
Traceback (most recent call last):
File "<stdin>", line 19154, in <module>
File "<stdin>", line 194, in main
File "<stdin>", line 82, in bootstrap
File "/tmp/tmpnYy5RP/pip.zip/pip/__init__.py", line 15, in <module>
File "/tmp/tmpnYy5RP/pip.zip/pip/vcs/subversion.py", line 9, in <module>
File "/tmp/tmpnYy5RP/pip.zip/pip/index.py", line 30, in <module>
File "/tmp/tmpnYy5RP/pip.zip/pip/wheel.py", line 32, in <module>
File "/tmp/tmpnYy5RP/pip.zip/pip/pep425tags.py", line 335, in <module>
File "/tmp/tmpnYy5RP/pip.zip/pip/pep425tags.py", line 307, in get_supported
File "/tmp/tmpnYy5RP/pip.zip/pip/pep425tags.py", line 163, in is_manylinux1_compatible
File "/tmp/tmpnYy5RP/pip.zip/pip/pep425tags.py", line 187, in have_compatible_glibc
ValueError: invalid literal for int() with base 10: '20-2014'
Hi there, could you please edit your issue post to include the versions of the three things listed above?
@rmcgibbo is have_compatible_glibc
flexible enough here?
@rubyon what operating system and version thereof are you using? Can you also post the output of the shell command $ ldd --version
and $ python -c 'import ctypes; p = ctypes.CDLL(None); fn = p.gnu_get_libc_version; fn.restype = ctypes.c_char_p; print(fn())'
please?
@Ivoz Right. It looks like it's not flexible enough -- perhaps some versions of glibc that we haven't tested previously use a different format of the version string. Knowing the output of the above commands would help decide what the best course is (the options I think are either to return False
from have_compatible_glibc
in the case of an unparsable version string, or figure out what this version string is and how to parse it (or both)).
Also ccing @njsmith.
@rmcgibbo please show this...
ash-4.3# ldd --version
ash: ldd: command not found
ash-4.3# python -c 'import ctypes; p = ctypes.CDLL(None); fn = p.gnu_get_libc_version; fn.restype = ctypes.c_char_p; print(fn())'
2.20-2014.11
ash-4.3#
My operating system is Synology DSM 6.0 (NAS) with Intel CPU
Is this actually a linux?
Appears to be "glibc linaro": https://releases.linaro.org/14.11/components/toolchain/glibc-linaro/
Appears to be only for ARM devices, so a quick hack would be to skip the have_compatible_glibc
check if we're not on i686 / x86-64. But probably it would be good to make have_compatible_glibc
more robust.
...actually, looking at is_manylinux1_compatible
, we _already_ only check the glibc version if we're on i686 or x86-64. Very odd that Synology would be using x86 for a little device like this, and even odder that they'd then install glibc with ARM patches, but...
@rubyon: Can you also paste the output of uname -a
?
Oh, reading comprehension fail, I see that you already said that it's an Intel CPU :-)
Here's some info related to this issue. I too have a Synology NAS and upgraded to their disk station manager (DSM) 6.0 software. This system comes with Python 2.7.11 installed by default and you have the option to install Python 3.5.1. Neither versions come with pip installed BUT it's easy to get pip now because of PEP 453. So you can just do a: _python -m ensurepip_ to get pip installed and you don't have to download and run get-pip.py anymore.
The pip that's installed in Python 3.5.1 after doing ensurepip is version 7.1.2. This version works with Python 3.5.1 but what I found out is that if you upgrade to the latest version of pip, version 8.1.1, pip breaks and doesn't work. You get the error mentioned above.
So the question is, is this going to be fixed in 8.1.2? FYI, as another piece of information I upgrade pip to 8.0.0 and it works, I then tried upgrading to 8.1.0 and it broke. So it appears that this broke somewhere in either 8.0.1, 8.0.2, 8.0.3 or 8.1.0. And again it's also broke in 8.1.1
@jschlade: Thanks for the info! And yeah, what broke is that pip 8.1 added support for "manylinux" wheels (see PEP 513), so that you'll be able to download linux wheels directly from pypi instead of having to compile them from scratch. The problem is that the code that tries to check whether your system is actually compatible with the manylinux spec (and in particular, has a new enough glibc) was not prepared for the unusual patched glibc that Synology is shipping. There's a proposed fix in #3590, and it'll probably be fixed in the next pip release -- but the pip maintainers are very busy, so it might take a little while before they have time to review the patch and then to make a release.
FYI - if this helps
root@DISKSTATION://volume1/@appstore/py3k/usr/local/bin# uname -a
Linux DISKSTATION 3.10.77 #7321 SMP Wed Mar 23 11:48:26 CST 2016 x86_64 GNU/Linux synology_braswell_716
@njsmith thank you for the 411. Looks like I could upgrade to 8.0.3 and wait for this fix. It's just an old habit that I always upgrade my packages to the latest releases... as I've never had an issue like this. :-)
Another piece of food for thought is, if pip is now that way to install packages, if pip breaks like this, there's no way to revert back to an older release. I had no choice but to hack my Python 3.5.1 site-packages directory and rm -fR pip and pip-8.x.x.dist-info directories and then do python -m ensurepip again to get to a version of pip that works. I'm not sure if this was the right way but it worked for me.
So it would be good to let users know what the correct, forcible way to remove pip is, if needed, in case of emergencies.
In this case you could also "fix" pip on your machine without upgrading or
downgrading by adding a file called _manylinux.py into your site packages
directory or sys.path that contains the line manylinux1_compatible=False
.
On Fri, Mar 25, 2016 at 1:21 PM, jschlade [email protected] wrote:
@njsmith https://github.com/njsmith thank you for the 411. Looks like I
could upgrade to 8.0.3 and wait for this fix. It's just an old habit that I
always upgrade my packages to the latest releases... as I've never had an
issue like this. :-)Another piece of food for thought is, if pip is now that way to install
packages, if pip breaks like this, there's no way to revert back to an
older release. I had no choice but to hack my Python 3.5.1 site-packages
directory and rm -fR pip and pip-8.x.x.dist-info directories and then do
python -m ensurepip again to get to a version of pip that works. I'm not
sure if this was the right way but it worked for me.So it would be good to let users know what the correct, forcible way to
remove pip is, if needed, in case of emergencies.โ
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/pypa/pip/issues/3588#issuecomment-201376149
-Robert
@rmcgibbo thanks for this info
I have the exact same problem on synology
@rmcgibbo where do i get this file?
Path "/usr/local/lib/python2.7/site-packages" correct?
@varwone On my Synology DS713+ I put the file at /usr/lib/python2.7/site-packages/_manylinux.py
Hi guys,
I have related problem.
I have been using shadowsocks server in my 214PLAY before upgrade to DSM6. It seems DSM6 break the Python and I struggled to install the shadowsocks server in DSM6 with rmcgibbo suggested method. The following is what I did to install the shadowsocks server in DSM6 :
Using PuTTY connect to my 214PLAY and login as admin then :
sudo su
python -m ensurepip
cd /usr/lib/python2.7/site-packages
echo manylinux1_compatible=False > _manylinux.py
pip install shadowsocks
cd /etc
vi shadowsocks.json
{
"server":"my_server_ip",
"server_port":8388,
"local_address": "127.0.0.1",
"local_port":1080,
"password":"mypassword",
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false
}
ssserver -c /etc/shadowsocks.json -d start
when start the shadowsocks server, I got the following error :
ash-4.3# cd /etc
ash-4.3# ssserver -c /etc/shadowsocks.json -d start
INFO: loading config from /etc/shadowsocks.json
Traceback (most recent call last):
File "/bin/ssserver", line 9, in <module>
load_entry_point('shadowsocks==2.8.2', 'console_scripts', 'ssserver')()
File "/usr/lib/python2.7/site-packages/shadowsocks/server.py", line 34, in main
config = shell.get_config(False)
File "/usr/lib/python2.7/site-packages/shadowsocks/shell.py", line 262, in get_config
check_config(config, is_local)
File "/usr/lib/python2.7/site-packages/shadowsocks/shell.py", line 124, in check_config
encrypt.try_cipher(config['password'], config['method'])
File "/usr/lib/python2.7/site-packages/shadowsocks/encrypt.py", line 44, in try_cipher
Encryptor(key, method)
File "/usr/lib/python2.7/site-packages/shadowsocks/encrypt.py", line 83, in __init__
random_string(self._method_info[1]))
File "/usr/lib/python2.7/site-packages/shadowsocks/encrypt.py", line 109, in get_cipher
return m[2](method, key, iv, op)
File "/usr/lib/python2.7/site-packages/shadowsocks/crypto/openssl.py", line 76, in __init__
load_openssl()
File "/usr/lib/python2.7/site-packages/shadowsocks/crypto/openssl.py", line 39, in load_openssl
'libcrypto')
File "/usr/lib/python2.7/site-packages/shadowsocks/crypto/util.py", line 60, in find_library
path = ctypes.util.find_library(name)
File "/usr/lib/python2.7/ctypes/util.py", line 247, in find_library
raise RuntimeError("can not find library %s" % name)
RuntimeError: can not find library crypto
I tried PIP install crypto but the result still the same, anyone can help?
@irblue you likely want the openssl package installed, possibly the dev package as well.
@Ivoz Sorry for being a newbie with Python :(, I tried install the openssl but no successful :
ash-4.3# pip install openssl
Collecting openssl
Could not find a version that satisfies the requirement openssl (from versions: )
No matching distribution found for openssl
Thank you in advance for any guidance.
Tried PIP install pyopenssl, still having error :
ash-4.3# pip install pyopenssl
Collecting pyopenssl
Downloading pyOpenSSL-16.0.0-py2.py3-none-any.whl (45kB)
100% |โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 51kB 1.7MB/s
Collecting cryptography>=1.3 (from pyopenssl)
Downloading cryptography-1.3.1.tar.gz (383kB)
100% |โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 389kB 586kB/s
Collecting six>=1.5.2 (from pyopenssl)
Downloading six-1.10.0-py2.py3-none-any.whl
Collecting idna>=2.0 (from cryptography>=1.3->pyopenssl)
Downloading idna-2.1-py2-none-any.whl (54kB)
100% |โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 61kB 1.8MB/s
Collecting pyasn1>=0.1.8 (from cryptography>=1.3->pyopenssl)
Downloading pyasn1-0.1.9-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools>=11.3 in /usr/lib/python2.7/site-packages/setuptools-20.6.7-py2.7.egg (from cryptography>=1.3->pyopenssl)
Collecting enum34 (from cryptography>=1.3->pyopenssl)
Downloading enum34-1.1.3-py2.py3-none-any.whl (61kB)
100% |โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 61kB 1.6MB/s
Collecting ipaddress (from cryptography>=1.3->pyopenssl)
Downloading ipaddress-1.0.16-py27-none-any.whl
Collecting cffi>=1.4.1 (from cryptography>=1.3->pyopenssl)
Downloading cffi-1.5.2.tar.gz (388kB)
100% |โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 389kB 571kB/s
Complete output from command python setup.py egg_info:
unable to execute '/usr/local/i686-pc-linux-gnu/bin/i686-pc-linux-gnu-ccache-gcc': No such file or directory
unable to execute '/usr/local/i686-pc-linux-gnu/bin/i686-pc-linux-gnu-ccache-gcc': No such file or directory
No working compiler found, or bogus compiler options
passed to the compiler from Python's distutils module.
See the error messages above.
(If they are about -mno-fused-madd and you are on OS/X 10.8,
see http://stackoverflow.com/questions/22313407/ .)
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-Wy2RPg/cffi/
No working compiler found,
That message would seem to imply that you don't have gcc (properly)
installed.
@irblue, openssl is a linux system / distribution package, not one that is in PyPI/pip can install.
I am still having this issue. Is there anyone who knows of a solution?
Still get the same issue
Traceback (most recent call last):
File "get-pip.py", line 19154, in <module>
main()
File "get-pip.py", line 194, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 82, in bootstrap
import pip
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/tmp/tmpyqvagq0r/pip.zip/pip/__init__.py", line 15, in <module>
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/tmp/tmpyqvagq0r/pip.zip/pip/vcs/subversion.py", line 9, in <module>
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/tmp/tmpyqvagq0r/pip.zip/pip/index.py", line 30, in <module>
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/tmp/tmpyqvagq0r/pip.zip/pip/wheel.py", line 32, in <module>
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/tmp/tmpyqvagq0r/pip.zip/pip/pep425tags.py", line 335, in <module>
File "/tmp/tmpyqvagq0r/pip.zip/pip/pep425tags.py", line 307, in get_supported
File "/tmp/tmpyqvagq0r/pip.zip/pip/pep425tags.py", line 163, in is_manylinux1_compatible
File "/tmp/tmpyqvagq0r/pip.zip/pip/pep425tags.py", line 187, in have_compatible_glibc
File "/tmp/tmpyqvagq0r/pip.zip/pip/pep425tags.py", line 187, in <listcomp>
ValueError: invalid literal for int() with base 10: '20-2014'
you can install the compiler for your NAS here: http://sourceforge.net/projects/dsgpl
I think you have to install this one: https://sourceforge.net/projects/dsgpl/files/DSM%206.0%20Tool%20Chains/Intel%20x86%20Linux%203.10.77%20%28Braswell%29/
Extract in /usr/local
Finally, I solved this problem by installing gcc in ipkg
.
see http://www.cphub.net add source to Package Center
# get gcc
wget http://ipkg.nslu2-linux.org/optware-ng/buildroot-x86_64/gcc_7.2.0-7_x86_64.ipk
# install
ipkg install ./buildroot-x86_64/gcc_7.2.0-7_x86_64.ipk
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
In this case you could also "fix" pip on your machine without upgrading or
downgrading by adding a file called _manylinux.py into your site packages
directory or sys.path that contains the line
manylinux1_compatible=False
.On Fri, Mar 25, 2016 at 1:21 PM, jschlade [email protected] wrote:
-Robert