I cannot install pip for pypy 4.0.1 on Ubuntu 15.10.
I downloaded pypy 4.0.1 from http://pypy.org/download.html. Created a symlink for it. And used wget to download get-pip.py from https://bootstrap.pypa.io/get-pip.py.
But when I ran sudo pypy get-pip.py
, I got exception:
Collecting pip
Exception:
Traceback (most recent call last):
File "/tmp/tmps2kjCI/pip.zip/pip/basecommand.py", line 211, in main
status = self.run(options, args)
File "/tmp/tmps2kjCI/pip.zip/pip/commands/install.py", line 294, in run
requirement_set.prepare_files(finder)
File "/tmp/tmps2kjCI/pip.zip/pip/req/req_set.py", line 334, in prepare_files
functools.partial(self._prepare_file, finder))
File "/tmp/tmps2kjCI/pip.zip/pip/req/req_set.py", line 321, in _walk_req_to_install
more_reqs = handler(req_to_install)
File "/opt/pypy-4.0.1-linux64/lib_pypy/_functools.py", line 42, in __call__
return self._func(*(self._args + fargs), **fkeywords)
File "/tmp/tmps2kjCI/pip.zip/pip/req/req_set.py", line 491, in _prepare_file
session=self.session)
File "/tmp/tmps2kjCI/pip.zip/pip/download.py", line 825, in unpack_url
session,
File "/tmp/tmps2kjCI/pip.zip/pip/download.py", line 673, in unpack_http_url
from_path, content_type = _download_http_url(link, session, temp_dir)
File "/tmp/tmps2kjCI/pip.zip/pip/download.py", line 885, in _download_http_url
with open(file_path, 'wb') as content_file:
TypeError: expected string, got NoneType object
I could run sudo python get-pip.py
without problem but failed with pypy. I also tried Ubuntu 12.04 and 14.04 but no luck.
I have Python 2.7.10 installed and I'm using a Linode machine. But changed to a DigitalOcean one didn't help.
How about installing PyPy from the Ubuntu archives sudo apt install pypy
. Or if you want the latest version, from the PyPy PPA
Then if you create a virtualenv, it will have pip inside it:
$ sudo apt-get install virtualenv
$ virtualenv -p pypy ve
$ source ./ve/bin/activate
$ pip install ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With