Pipenv: Could I change pip's mirror in pipenv?

Created on 29 Dec 2017  ·  1Comment  ·  Source: pypa/pipenv

Be sure to check the existing issues, both open and closed.

Describe the issue briefly here.

Describe your environment
  1. Linux
  2. Python version: 3.6
  3. Pipenv version: 9.0.1
Expected result

I use pipenv install records, but pypi.python.org 's connection is timeout, I want to change pypi.python.org to mirrors.aliyun.com, how could I do?

Actual result

pipenv install records
Creating a virtualenv for this project…
⠋Using base prefix '/usr/local/miniconda2/envs/py3_env'
New python executable in /root/.local/share/virtualenvs/tmp-XVr6zr33/bin/python3
Also creating executable in /root/.local/share/virtualenvs/tmp-XVr6zr33/bin/python
/root/.local/share/virtualenvs/tmp-XVr6zr33/bin/python3: error while loading shared libraries: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory
ERROR: The executable /root/.local/share/virtualenvs/tmp-XVr6zr33/bin/python3 is not functioning
ERROR: It thinks sys.prefix is '/tmp' (should be '/root/.local/share/virtualenvs/tmp-XVr6zr33')
ERROR: virtualenv is not compatible with this system or executable

Virtualenv location:
Installing records…

Collecting records
Using cached records-0.5.2-py2.py3-none-any.whl
Requirement already satisfied: docopt in /usr/local/miniconda2/envs/py3_env/lib/python3.6/site-packages (from records)
Collecting SQLAlchemy (from records)
Downloading SQLAlchemy-1.2.0.tar.gz (5.5MB)

Error: An error occurred while installing records!
Exception:
Traceback (most recent call last):
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 232, in _error_catcher
yield
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 314, in read
data = self._fp.read(amt)
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 60, in read
data = self.__fp.read(amt)
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/http/client.py", line 449, in read
n = self.readinto(b)
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/http/client.py", line 493, in readinto
n = self.fp.readinto(b)
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/ssl.py", line 1002, in recv_into
return self.read(nbytes, buffer)
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/ssl.py", line 865, in read
return self._sslobj.read(len, buffer)
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/ssl.py", line 625, in read
v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/site-packages/pip/basecommand.py", line 215, in
main
status = self.run(options, args)
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/site-packages/pip/commands/install.py", line 335, in run
wb.build(autobuilding=True)
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/site-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/site-packages/pip/req/req_set.py", line 380, in
prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/site-packages/pip/req/req_set.py", line 620, in
_prepare_file
session=self.session, hashes=hashes)
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/site-packages/pip/download.py", line 821, in unpack_url
hashes=hashes
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/site-packages/pip/download.py", line 659, in unpack_http_url
hashes)
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/site-packages/pip/download.py", line 882, in _download_http_url
_download_url(resp, link, content_file, hashes)
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/site-packages/pip/download.py", line 603, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/site-packages/pip/utils/hashes.py", line 46, in
check_against_chunks
for chunk in chunks:
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/site-packages/pip/download.py", line 571, in written_chunks
for chunk in chunks:
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/site-packages/pip/utils/ui.py", line 139, in iter
for x in it:
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/site-packages/pip/download.py", line 560, in resp_read
decode_content=False):
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 357, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 324, in read
flush_decoder = True
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/contextlib.py", line 100, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/miniconda2/envs/py3_env/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 237, in _error_catcher
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
pip._vendor.requests.packages.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out.

Steps to replicate

Provide the steps to replicate (which usually at least includes the commands and the Pipfile).

Most helpful comment

Change/add to the [[ source ]] section in Pipfile?

>All comments

Change/add to the [[ source ]] section in Pipfile?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jakul picture jakul  ·  3Comments

FooBarQuaxx picture FooBarQuaxx  ·  3Comments

ipmb picture ipmb  ·  3Comments

leileigong picture leileigong  ·  3Comments

bgjelstrup picture bgjelstrup  ·  3Comments