Closed connormclaud closed 5 years ago
I narrowed down this issue to single package
pipenv install gensim
behaves the same. Pipenv lock just hangs
I was having the same issue on pipenv 2018.5.18 (it was hanging at Locking [packages] dependencies...
when trying to run pipenv install ansible
), but upgrading to 2018.7.1 seemed to help. It still took a while, but it didn't get stuck for ages.
Hadn't realized I was running an older version since I haven't developed anything on this machine in a couple months.
can you try pipenv lock --clear
and see if that helps?
I did try pipenv lock --clear
. Behavior didn't changed
Strangely the resolution actually done (see verbose log). Something is probably wrong with the subprocess.
Also there is no such package named docker-compose
, but that is likely not related to the problem.
I couldn’t replicate this, locking did take 2.5 minutes though
@uranusjr https://pypi.org/project/docker-compose/
I can't reproduce this issue anymore. Environment didn't change, locking took seconds now. I had issues with network yesterday (~12% of packets were lost) so this probably was the reason. I remember that pipenv works really slow in presence of packet loss in network (which is often the case for my network). Anyway closing this issue
I stil experience this issue with gensim
specifically. It hangs at the stage of locking dependencies, whenever gensim
is in the list. Any solution yet?
I experience the same issue with a package flask-restless - pipenv hangs on Locking [packages] dependencies
.
Even sudo pipenv lock --clear
is hanged. When I use --skip-lock
it runs fine but pip freeze
is empty in this case
Please do not ever run pipenv with sudo, you will now need to sudo chown -R youruser:yourgroup ~/.cache/pipenv
or wherever your cache directory is located. We really can't provide support if you do this kind of thing
Do note that "hangs" is not a descriptive or actionable bug report. You will need to provide actual data, including runtime, network traffic, cpu usage of the process, etc, if you want us to act on your report. If you can't or won't provide that information, we can't help you
It's crazy it took almost 20 minutes to create the lock file and there was no sign of activity from the command line. At least you can provide a progress bar with an ETA to notify the user something is going on at background.
Generating Pipfile.lock
Locking ... dependecy [=====---------------] 25% ETA: 10m 54s
Hello,
I had the same symptom "pipenv hangs during package installation" At least in my case it seems to be a resource problem. I switched from EC2 t2.nano yo t2.medium and the installation was ok. (and revert to t2.nano for running app...)
Config : debian strech python 2.7.13 & 3.5.3 pipenv 2018.11.26
Same here with: Python 3.6.5 pipenv 2018.11.26
My Pipfile looks like this (hope it helps):
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
numpy = "*"
[packages]
django = "*"
django-import-export = "*"
djangorestframework = "*"
mysqlclient = "*"
six = "*"
coreapi = "*"
maya = "*"
[requires]
python_version = "3.6"
I experience the same issue. It gets stuck when locking the dependencies and if I wait long enough i receive timeout error. Im on PyCharm on mac. Im in a Docker app.
Similar for me. Pipenv hanging with "Locking..." message about 10 minutes (not hours, but clearly, it can be related). Also, i tried to remove Pip.lock file to fix this behaviour, and got same result.
Here my configuration output (OS - mac os 10.14.1):
Reopening this issue as many users reported experiencing the same.
In my case root cause is bad network (~10% packets are lost). Pipenv install --skip-lock not causes this issue. It is in pipenv lock implementation something is relying on good network connection.
Do note that "hangs" is not a descriptive or actionable bug report. You will need to provide actual data, including runtime, network traffic, cpu usage of the process, etc, if you want us to act on your report. If you can't or won't provide that information, we can't help you
Please, provide this info if you can.
I encountered this same issue when creating a fresh environment and trying to install a new package. (I'm on Windows 10, Python 3.7.2, pip 19.0.2, pipenv 2018.11.26). Running pipenv lock
and pipenv install matplotlib~=3.0.2
started the process, but neither would not complete after 15+ minutes - a fact I found strange because I had not yet installed any packages.
I was mystified until I realized that I had a pipfile backup copy from another environment in an ancestor directory (initially the parent, then the great-grandparent). Once I moved it off of this path, pipenv worked in reasonable amounts of time. Maybe the install/lock commands are finding the wrong lock file and that's what's causing things to hang?
I have been noticing this just today as well (hasn't happened before). When I run either pipenv lock
or pipenv install [PACKAGE]
, it will get to the locking phase and then simply stop doing anything. Even adding the verbose
flag will not display any output other than the single Locking [packages] dependencies…
line.
This is my Pipfile after running the command:
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
flask = "*"
flask-restful = "*"
django = "*"
psycopg2 = "*"
psycopg2-binary = "*"
djangorestframework = "*"
markdown = "*"
django-filter = "*"
[requires]
python_version = "3.7"
$ docker-compose exec reporting-api bash
python@5c8fa9da481a:~/app$ pipenv install psycopg2-binary djangorestframework markdown django-filter
Creating a virtualenv for this project…
Pipfile: /home/python/app/Pipfile
Using /usr/local/bin/python (3.7.2) to create virtualenv…
⠙ Creating virtual environment...Already using interpreter /usr/local/bin/python
Using base prefix '/usr/local'
New python executable in /home/python/.local/share/virtualenvs/app-FIUXGKQK/bin/python
Installing setuptools, pip, wheel...
done.
✔ Successfully created virtual environment!
Virtualenv location: /home/python/.local/share/virtualenvs/app-FIUXGKQK
Installing psycopg2-binary…
Adding psycopg2-binary to Pipfile's [packages]…
✔ Installation Succeeded
Installing djangorestframework…
Adding djangorestframework to Pipfile's [packages]…
✔ Installation Succeeded
Installing markdown…
Adding markdown to Pipfile's [packages]…
✔ Installation Succeeded
Installing django-filter…
Adding django-filter to Pipfile's [packages]…
✔ Installation Succeeded
Pipfile.lock (d5c992) out of date, updating to (13c0a5)…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/pexpect/expect.py", line 109, in expect_loop
return self.timeout()
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/pexpect/expect.py", line 82, in timeout
raise TIMEOUT(msg)
pexpect.exceptions.TIMEOUT: <pexpect.popen_spawn.PopenSpawn object at 0x7f226482f630>
searcher: searcher_re:
0: re.compile('\n')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 10, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/cli/command.py", line 254, in install
editable_packages=state.installstate.editables,
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 1992, in do_install
skip_lock=skip_lock,
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 1221, in do_init
pypi_mirror=pypi_mirror,
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 1068, in do_lock
lockfile=lockfile
File "/usr/local/lib/python3.7/site-packages/pipenv/utils.py", line 649, in venv_resolve_deps
c = resolve(cmd, sp)
File "/usr/local/lib/python3.7/site-packages/pipenv/utils.py", line 517, in resolve
result = c.expect(u"\n", timeout=environments.PIPENV_INSTALL_TIMEOUT)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/delegator.py", line 215, in expect
self.subprocess.expect(pattern=pattern, timeout=timeout)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/pexpect/spawnbase.py", line 341, in expect
timeout, searchwindowsize, async_)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/pexpect/spawnbase.py", line 369, in expect_list
return exp.expect_loop(timeout)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/pexpect/expect.py", line 119, in expect_loop
return self.timeout(e)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/pexpect/expect.py", line 82, in timeout
raise TIMEOUT(msg)
pexpect.exceptions.TIMEOUT: <pexpect.popen_spawn.PopenSpawn object at 0x7f226482f630>
searcher: searcher_re:
0: re.compile('\n')
<pexpect.popen_spawn.PopenSpawn object at 0x7f226482f630>
searcher: searcher_re:
0: re.compile('\n')
Reproduce
cd /tmp
pipenv install
pipenv install scipy
Seems to install fine but locking takes ages and doesn't seem to finish which makes it impossible to install some things.
pipenv is getting stuck at the [locking package dependencies] stage indefinitely.
pipenv lock --verbose
Locking [dev-packages] dependencies…
Using pip: -i https://pypi.python.org/simple
ROUND 1
Current constraints:
Finding the best candidates:
Finding secondary dependencies:
------------------------------------------------------------
Result of round 1: stable, done
Locking [packages] dependencies…
I'm getting this same pexpect.exceptions.TIMEOUT: <pexpect.popen_spawn.PopenSpawn object at 0x051B3450>
error on the latest version (2018.11.16)
I'm attempting to pipenv install
the following:
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
requests = "==2.21.0"
beautifulsoup4 = "*"
[requires]
python_version = "3.6"
Mine locks as well. My Pipfile
:
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
pandas = "*"
keras = "*"
numpy = "*"
tensorflow-gpu = "*"
python-dotenv = "*"
six = "*"
[requires]
python_version = "3.6"
Output of pipenv --support
I am also experiencing this problem with pipenv version 2018.11.26
when installing gensim. My Pipfile looks like this:
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
gensim = "*"
[dev-packages]
[requires]
python_version = "3.6"
for folks on the november release try setting export PIPENV_TIMEOUT=900
first.
Otherwise if you are running this in docker, please provide a dockerfile I can use to reproduce with. We will get to the bottom of this one
Thanks everyone
Using this pipfile:
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
gensim = "*"
[dev-packages]
[requires]
python_version = "3.6"
And this dockerfile:
FROM python:3.6.6
ENV PYTHONUNBUFFERED 1
RUN set -ex && mkdir -p /app
WORKDIR /app
COPY Pipfile .
COPY pipenv-2018.11.27.dev0-py3-none-any.whl .
RUN apt-get update && apt-get install -y \
sudo && apt-get install -y \
git
RUN set -ex && python3 -m pip install --upgrade pipenv-2018.11.27.dev0-py3-none-any.whl
# COPY Pipfile.lock .
# Install python requirements
RUN pipenv install
Which installs a pipenv wheel built from the master branch, I am able to successfully build and launch a container in 7 minutes. Bearing in mind that on older versions of pip this builds numpy and scipy from source, this is to be expected. This issue appears to be resolved in the master branch so I'm going to close this out unless someone can provide me a reproduction using the master branch which shows thisi bug continuing to occur.
Thanks for your patience all around, much appreciated
I realised this ticket is closed - but as it comes up first in a google search I thought that someone might find it useful to know that, having seen this very issue and struggling to deal with it for a couple of days, I solved it by using PIP_NO_CACHE_DIR=off
when running pipenv install
I realised this ticket is closed - but as it comes up first in a google search I thought that someone might find it useful to know that, having seen this very issue and struggling to deal with it for a couple of days, I solved it by using
PIP_NO_CACHE_DIR=off
when runningpipenv install
Sir, you have saved my day. Thank you. I don't know why the issue was closed because the problem is definitely still there. With your fix it looks like it works.
just did
[[source]]
verify_ssl = false
Experienced this when trying to install gensim. I canceled the process with ctrl+c then tried installing again which worked.
I am also facing the same issue since 3-4 days.Have tried all the setting .My pipfile looks like below:
[[source]] name = "pypi" url = "https://pypi.org/simple" verify_ssl = trye
[dev-packages]
[packages] requests = "" pandas = "" matplotlib = "" beautifulsoup4 = {path = "./beautifulsoup4-4.8.1-py3-none-any.whl"} soupsieve = {path = "./soupsieve-1.9.5-py2.py3-none-any.whl"} seaborn = ""
[requires] python_version = "3.7"
on every pipenv install command, getting the below type of error: ARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', OSError(0, 'Error'))': /simple/seaborn/", 'ERROR: Could not find a version that satisfies the requirement seaborn (from versions: none)', 'ERROR: No matching distribution found for seaborn']
this worked for me: `[[source]] name = "pypi" url = "https://pypi.org/simple" verify_ssl = false
[packages] requests = "" pandas = "" matplotlib = "" seaborn = ""
[requires] python_version = "3.7" ` I had to remove the relative path links and made the verify_ssl false (you have 'trye')
I tried to install a tiny package and got stuck forever while consumed ~1GB (!) of traffic in the background.
> pipenv --version
pipenv, version 2018.05.18
Is it something wrong with pipenv or I just got so much stale caches in need to be updated? Sorry if I post in the wrong thread.
I have the same problem in all of my projects.
The cause seems to be pylint.
Pipenv (pip) can install it successfully, but locking takes forever!
pipenv, version 2018.11.26
same here. I am trying PIP_NO_CACHE_DIR=off pipenv install pandas
and it still hangs forever :(
This should be open. This is still happening with pipenv, version 2020.8.13
I am also suffering from this using version 2020.8.13. This is what I was running:
PIP_NO_CACHE_DIR=off pipenv lock --clear -v
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Building requirements...
Resolving dependencies...
⠸ Locking...
ROUND 1
⠴ Locking...
I think the output of --verbose
should be definitely improved. As you can see, it is impossible to understand what is going on.
Note: This is also supposed to lock a module installed with --editable
, I am not sure if this causes any issues.
I'm getting the same issue as well. I think it's a network issue because when I kill the process with control+c
the error stack roots at OpenSSL.SSL.WantReadError
.
✘ Locking Failed!
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/urllib3/contrib/pyopenssl.py", line 313, in recv_into
return self.connection.recv_into(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1840, in recv_into
self._raise_ssl_error(self._ssl, result)
File "/usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1646, in _raise_ssl_error
raise WantReadError()
OpenSSL.SSL.WantReadError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/urllib3/contrib/pyopenssl.py", line 313, in recv_into
return self.connection.recv_into(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1840, in recv_into
self._raise_ssl_error(self._ssl, result)
File "/usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1646, in _raise_ssl_error
raise WantReadError()
OpenSSL.SSL.WantReadError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/urllib3/contrib/pyopenssl.py", line 313, in recv_into
return self.connection.recv_into(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1840, in recv_into
self._raise_ssl_error(self._ssl, result)
File "/usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1646, in _raise_ssl_error
raise WantReadError()
OpenSSL.SSL.WantReadError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/urllib3/contrib/pyopenssl.py", line 313, in recv_into
return self.connection.recv_into(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1840, in recv_into
self._raise_ssl_error(self._ssl, result)
File "/usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1646, in _raise_ssl_error
raise WantReadError()
OpenSSL.SSL.WantReadError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/urllib3/contrib/pyopenssl.py", line 313, in recv_into
return self.connection.recv_into(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1840, in recv_into
self._raise_ssl_error(self._ssl, result)
File "/usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1646, in _raise_ssl_error
raise WantReadError()
OpenSSL.SSL.WantReadError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/urllib3/contrib/pyopenssl.py", line 313, in recv_into
return self.connection.recv_into(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1840, in recv_into
self._raise_ssl_error(self._ssl, result)
File "/usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1646, in _raise_ssl_error
raise WantReadError()
OpenSSL.SSL.WantReadError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pipenv/resolver.py", line 807, in <module>
main()
File "/usr/local/lib/python3.7/site-packages/pipenv/resolver.py", line 803, in main
parsed.requirements_dir, parsed.packages, parse_only=parsed.parse_only)
File "/usr/local/lib/python3.7/site-packages/pipenv/resolver.py", line 785, in _main
resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages)
File "/usr/local/lib/python3.7/site-packages/pipenv/resolver.py", line 753, in resolve_packages
requirements_dir=requirements_dir,
File "/usr/local/lib/python3.7/site-packages/pipenv/resolver.py", line 736, in resolve
req_dir=requirements_dir
File "/usr/local/lib/python3.7/site-packages/pipenv/utils.py", line 1386, in resolve_deps
req_dir=req_dir,
File "/usr/local/lib/python3.7/site-packages/pipenv/utils.py", line 1094, in actually_resolve_deps
hashes = resolver.resolve_hashes()
File "/usr/local/lib/python3.7/site-packages/pipenv/utils.py", line 970, in resolve_hashes
resolved_hashes = self.resolver.resolve_hashes(self.results)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/resolver.py", line 149, in resolve_hashes
return {ireq: self.repository.get_hashes(ireq) for ireq in ireqs}
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/resolver.py", line 149, in <dictcomp>
return {ireq: self.repository.get_hashes(ireq) for ireq in ireqs}
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 406, in get_hashes
map(lambda c: self._hash_cache.get_hash(c.link), matching_candidates)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 404, in <setcomp>
result = {
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 406, in <lambda>
map(lambda c: self._hash_cache.get_hash(c.link), matching_candidates)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 85, in get_hash
hash_value = self._get_file_hash(new_location) if not new_location.url.startswith("ssh") else None
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 94, in _get_file_hash
for chunk in iter(lambda: fp.read(8096), b""):
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 94, in <lambda>
for chunk in iter(lambda: fp.read(8096), b""):
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/urllib3/response.py", line 507, in read
data = self._fp.read(amt) if not fp_closed else b""
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/cachecontrol/filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "/usr/local/opt/python@3.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 457, in read
n = self.readinto(b)
File "/usr/local/opt/python@3.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 501, in readinto
n = self.fp.readinto(b)
File "/usr/local/opt/python@3.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/urllib3/contrib/pyopenssl.py", line 328, in recv_into
return self.recv_into(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/urllib3/contrib/pyopenssl.py", line 328, in recv_into
return self.recv_into(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/urllib3/contrib/pyopenssl.py", line 328, in recv_into
return self.recv_into(*args, **kwargs)
[Previous line repeated 2 more times]
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/urllib3/contrib/pyopenssl.py", line 325, in recv_into
if not util.wait_for_read(self.socket, self.socket.gettimeout()):
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/urllib3/util/wait.py", line 146, in wait_for_read
return wait_for_socket(sock, read=True, timeout=timeout)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/urllib3/util/wait.py", line 107, in poll_wait_for_socket
return bool(_retry_on_intr(do_poll, timeout))
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/urllib3/util/wait.py", line 43, in _retry_on_intr
return fn(timeout)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/urllib3/util/wait.py", line 105, in do_poll
return poll_obj.poll(t)
KeyboardInterrupt```
After removing verify_ssl
from the Pipenv
file I get this:
✘ Locking Failed!
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pipenv/resolver.py", line 807, in <module>
main()
File "/usr/local/lib/python3.7/site-packages/pipenv/resolver.py", line 803, in main
parsed.requirements_dir, parsed.packages, parse_only=parsed.parse_only)
File "/usr/local/lib/python3.7/site-packages/pipenv/resolver.py", line 785, in _main
resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages)
File "/usr/local/lib/python3.7/site-packages/pipenv/resolver.py", line 753, in resolve_packages
requirements_dir=requirements_dir,
File "/usr/local/lib/python3.7/site-packages/pipenv/resolver.py", line 736, in resolve
req_dir=requirements_dir
File "/usr/local/lib/python3.7/site-packages/pipenv/utils.py", line 1386, in resolve_deps
req_dir=req_dir,
File "/usr/local/lib/python3.7/site-packages/pipenv/utils.py", line 1094, in actually_resolve_deps
hashes = resolver.resolve_hashes()
File "/usr/local/lib/python3.7/site-packages/pipenv/utils.py", line 970, in resolve_hashes
resolved_hashes = self.resolver.resolve_hashes(self.results)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/resolver.py", line 149, in resolve_hashes
return {ireq: self.repository.get_hashes(ireq) for ireq in ireqs}
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/resolver.py", line 149, in <dictcomp>
return {ireq: self.repository.get_hashes(ireq) for ireq in ireqs}
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 406, in get_hashes
map(lambda c: self._hash_cache.get_hash(c.link), matching_candidates)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 404, in <setcomp>
result = {
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 406, in <lambda>
map(lambda c: self._hash_cache.get_hash(c.link), matching_candidates)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 85, in get_hash
hash_value = self._get_file_hash(new_location) if not new_location.url.startswith("ssh") else None
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 93, in _get_file_hash
with open_local_or_remote_file(location, self.session) as (fp, size):
File "/usr/local/opt/python@3.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py", line 112, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 476, in open_local_or_remote_file
response = session.get(url, headers=headers, stream=True)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/requests/sessions.py", line 546, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/network/session.py", line 405, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/requests/sessions.py", line 524, in request
prep.url, proxies, stream, verify, cert
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/requests/sessions.py", line 700, in merge_environment_settings
env_proxies = get_environ_proxies(url, no_proxy=no_proxy)
File "/usr/local/lib/python3.7/site-packages/pipenv/patched/notpip/_vendor/requests/utils.py", line 764, in get_environ_proxies
return getproxies()
File "/usr/local/opt/python@3.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 2648, in getproxies
return getproxies_environment() or getproxies_macosx_sysconf()
File "/usr/local/opt/python@3.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 2501, in getproxies_environment
for name, value in os.environ.items():
File "/usr/local/opt/python@3.7/bin/../Frameworks/Python.framework/Versions/3.7/lib/python3.7/_collections_abc.py", line 743, in __iter__
for key in self._mapping:
File "/usr/local/opt/python@3.7/bin/../Frameworks/Python.framework/Versions/3.7/lib/python3.7/os.py", line 703, in __iter__
yield self.decodekey(key)
File "/usr/local/opt/python@3.7/bin/../Frameworks/Python.framework/Versions/3.7/lib/python3.7/os.py", line 759, in decode
return value.decode(encoding, 'surrogateescape')
KeyboardInterrupt
For reference my Pipenv
file:
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
flask = "*"
jinja2 = "*"
flask-bootstrap4 = "*"
torch = "*"
torchvision = "*"
matplotlib = "*"
numpy = "*"
bentoml = "*"
scikit-learn = "*"
[requires]
python_version = "3.7"
It's still happening, Removing psycopg2-binary from Pipfile... Locking [dev-packages] dependencies... Building requirements... Resolving dependencies... ✘ Locking Failed! Traceback (most recent call last): File "/home/gopalsingh/.local/lib/python3.6/site-packages/pipenv/vendor/urllib3/connectionpool.py", line 382, in _make_request self._validate_conn(conn) File "/home/gopalsingh/.local/lib/python3.6/site-packages/pipenv/vendor/urllib3/connectionpool.py", line 1010, in _validate_conn conn.connect() File "/home/gopalsingh/.local/lib/python3.6/site-packages/pipenv/vendor/urllib3/connection.py", line 421, in connect tls_in_tls=tls_intls, File "/home/gopalsingh/.local/lib/python3.6/site-packages/pipenv/vendor/urllib3/util/ssl.py", line 421, in ssl_wrap_socket sock, context, tls_in_tls, server_hostname=serverhostname File "/home/gopalsingh/.local/lib/python3.6/site-packages/pipenv/vendor/urllib3/util/ssl.py", line 464, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/usr/lib/python3.6/ssl.py", line 407, in wrap_socket _context=self, _session=session) File "/usr/lib/python3.6/ssl.py", line 817, in init self.do_handshake() File "/usr/lib/python3.6/ssl.py", line 1077, in do_handshake self._sslobj.do_handshake() File "/usr/lib/python3.6/ssl.py", line 689, in do_handshake self._sslobj.do_handshake() socket.timeout: _ssl.c:835: The handshake operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/gopalsingh/.local/lib/python3.6/site-packages/pipenv/vendor/requests/adapters.py", line 449, in send timeout=timeout File "/home/gopalsingh/.local/lib/python3.6/site-packages/pipenv/vendor/urllib3/connectionpool.py", line 756, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "/home/gopalsingh/.local/lib/python3.6/site-packages/pipenv/vendor/urllib3/util/retry.py", line 531, in increment raise six.reraise(type(error), error, _stacktrace) File "/home/gopalsingh/.local/lib/python3.6/site-packages/pipenv/vendor/urllib3/packages/six.py", line 735, in reraise raise value File "/home/gopalsingh/.local/lib/python3.6/site-packages/pipenv/vendor/urllib3/connectionpool.py", line 706, in urlopen chunked=chunked, File "/home/gopalsingh/.local/lib/python3.6/site-packages/pipenv/vendor/urllib3/connectionpool.py", line 385, in _make_request self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) File "/home/gopalsingh/.local/lib/python3.6/site-packages/pipenv/vendor/urllib3/connectionpool.py", line 337, in _raise_timeout self, url, "Read timed out. (read timeout=%s)" % timeout_value urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=10)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/gopalsingh/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 764, in
But when i again ran pipenv uninstall psycopg2, it updated the pipfile.lock Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning. Uninstalling psycopg2-binary... No package psycopg2-binary to remove from Pipfile. Locking [dev-packages] dependencies... Building requirements... Resolving dependencies... ✔ Success! Locking [packages] dependencies... Building requirements... Resolving dependencies... ✔ Success! Updated Pipfile.lock (1512d6)!
Issue description
Run pipenv lock. Wait for an hour without visible progress
Expected result
Pipenv locks in reasonable time
Actual result
When possible, provide the verbose output (
--verbose
), especially for locking and dependencies resolving issues.Steps to replicate
Provide the steps to replicate (which usually at least includes the commands and the Pipfile). Run pipenv lock on following file:
Please run
$ pipenv --support
, and paste the results here. Don't put backticks (`
) around it! The output already contains Markdown formatting.If you're on macOS, run the following:
If you're on Windows, run the following:
If you're on Linux, run the following:
$ pipenv --support
Pipenv version: `'2018.7.1'` Pipenv location: `'/home/connormclaud/.pyenv/versions/3.6.6/lib/python3.6/site-packages/pipenv'` Python location: `'/home/connormclaud/.pyenv/versions/3.6.6/bin/python3.6'` Other Python installations in `PATH`: - `2.7`: `/usr/bin/python2.7` - `2.7`: `/usr/bin/python2.7` - `3.6`: `/home/connormclaud/.pyenv/versions/3.6.6/bin/python3.6m` - `3.6`: `/home/connormclaud/.pyenv/versions/3.6.6/bin/python3.6` - `3.6`: `/home/connormclaud/.pyenv/shims/python3.6` - `3.6`: `/usr/bin/python3.6` - `3.6.6`: `/home/connormclaud/.pyenv/versions/3.6.6/bin/python` - `3.6.6`: `/home/connormclaud/.pyenv/shims/python` - `2.7.15`: `/usr/bin/python` - `2.7.15`: `/usr/bin/python2` - `3.6.6`: `/home/connormclaud/.pyenv/versions/3.6.6/bin/python3` - `3.6.6`: `/home/connormclaud/.pyenv/shims/python3` - `3.6.5`: `/usr/bin/python3` PEP 508 Information: ``` {'implementation_name': 'cpython', 'implementation_version': '3.6.6', 'os_name': 'posix', 'platform_machine': 'x86_64', 'platform_python_implementation': 'CPython', 'platform_release': '4.15.0-29-generic', 'platform_system': 'Linux', 'platform_version': '#31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018', 'python_full_version': '3.6.6', 'python_version': '3.6', 'sys_platform': 'linux'} ``` System environment variables: - `CLUTTER_IM_MODULE` - `NVM_DIR` - `LS_COLORS` - `LC_MEASUREMENT` - `LESSCLOSE` - `LC_PAPER` - `LC_MONETARY` - `XDG_MENU_PREFIX` - `LANG` - `DISPLAY` - `PYENV_ROOT` - `OLDPWD` - `GNOME_SHELL_SESSION_MODE` - `COLORTERM` - `NVM_CD_FLAGS` - `DESKTOP_AUTOSTART_ID` - `USERNAME` - `PYENV_HOOK_PATH` - `XDG_VTNR` - `SSH_AUTH_SOCK` - `MANDATORY_PATH` - `S_COLORS` - `LC_NAME` - `XDG_SESSION_ID` - `USER` - `PYENV_DIR` - `DESKTOP_SESSION` - `QT4_IM_MODULE` - `TEXTDOMAINDIR` - `GNOME_TERMINAL_SCREEN` - `DEFAULTS_PATH` - `PWD` - `HOME` - `TEXTDOMAIN` - `SSH_AGENT_PID` - `PYENV_VERSION` - `QT_ACCESSIBILITY` - `XDG_SESSION_TYPE` - `XDG_DATA_DIRS` - `XDG_SESSION_DESKTOP` - `LC_ADDRESS` - `LC_NUMERIC` - `GTK_MODULES` - `WINDOWPATH` - `VTE_VERSION` - `SHELL` - `TERM` - `QT_IM_MODULE` - `XMODIFIERS` - `IM_CONFIG_PHASE` - `NVM_BIN` - `XDG_CURRENT_DESKTOP` - `GPG_AGENT_INFO` - `GNOME_TERMINAL_SERVICE` - `SHLVL` - `XDG_SEAT` - `PYENV_SHELL` - `LC_TELEPHONE` - `GDMSESSION` - `GNOME_DESKTOP_SESSION_ID` - `LOGNAME` - `DBUS_SESSION_BUS_ADDRESS` - `XDG_RUNTIME_DIR` - `XAUTHORITY` - `XDG_CONFIG_DIRS` - `PATH` - `LC_IDENTIFICATION` - `SESSION_MANAGER` - `LESSOPEN` - `GTK_IM_MODULE` - `LC_TIME` - `PYTHONDONTWRITEBYTECODE` - `PIP_PYTHON_PATH` Pipenv–specific environment variables: Debug–specific environment variables: - `PATH`: `/home/connormclaud/.pyenv/versions/3.6.6/bin:/home/connormclaud/.pyenv/libexec:/home/connormclaud/.pyenv/plugins/python-build/bin:/home/connormclaud/.nvm/versions/node/v10.5.0/bin:/home/connormclaud/.pyenv/shims:/home/connormclaud/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin` - `SHELL`: `/bin/bash` - `LANG`: `en_US.UTF-8` - `PWD`: `/home/connormclaud/PycharmProjects/vectorizer` --------------------------- Contents of `Pipfile` ('/home/connormclaud/PycharmProjects/vectorizer/Pipfile'): ```toml [[source]] url = "https://pypi.org/simple" verify_ssl = true name = "pypi" [packages] falcon = "*" docker-compose = "*" gunicorn = "*" gensim = "*" [dev-packages] httpie = "*" [requires] python_version = "3.6" ```