Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install does not response, but works well with option '--no-cache-dir' #6078

Closed
yarikoptic opened this issue Dec 10, 2018 · 3 comments
Closed
Labels
auto-locked Outdated issues that have been locked by automation resolution: duplicate Duplicate of an existing issue/PR

Comments

@yarikoptic
Copy link

This is a reincarnation of #3245 which was hoped to be resolved, but likely it was not:

$ pip install --verbose -r requirements-devel.txt 
...
Requirement already satisfied: BeautifulSoup4 in /usr/lib/python2.7/dist-packages (from datalad==0.11.1->-r requirements-devel.txt (line 7)) (4.4.1)
Collecting httpretty>=0.8.14 (from datalad==0.11.1->-r requirements-devel.txt (line 7))
  1 location(s) to search for versions of httpretty:
  * https://pypi.org/simple/httpretty/
  Getting page https://pypi.org/simple/httpretty/
  Looking up "https://pypi.org/simple/httpretty/" in the cache
  Request header has "max_age" as 0, cache bypassed
  https://pypi.org:443 "GET /simple/httpretty/ HTTP/1.1" 200 4999
  Updating cache with response from "https://pypi.org/simple/httpretty/"
  Caching due to etag

Environment

  • pip version:
(venv-ci) buildbot@5c4d1bd619d5:~/datalad-pr-docker-dl-nd16_04/build$ pip --version
/home/buildbot/datalad-pr-docker-dl-nd16_04/build/venv-ci/local/lib/python2.7/site-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
  warnings.warn(warning, RequestsDependencyWarning)
pip 18.1 from /home/buildbot/datalad-pr-docker-dl-nd16_04/build/venv-ci/local/lib/python2.7/site-packages/pip (python 2.7)
  • Python version: 2.7.12
  • OS: Docker container with Ubuntu 16.04, virtualenv inside
@pradyunsg pradyunsg added the S: needs triage Issues/PRs that need to be triaged label Dec 14, 2018
@martin-vi
Copy link

Same problem here, pip always halts for the package click.

$ pip3 -v install click==6.7
Created temporary directory: /tmp/pip-ephem-wheel-cache-2pwri2uk
Created temporary directory: /tmp/pip-req-tracker-wfyq_ln0
Created requirements tracker '/tmp/pip-req-tracker-wfyq_ln0'
Created temporary directory: /tmp/pip-install-4gnknube
Collecting click==6.7
  1 location(s) to search for versions of click:
  * https://pypi.org/simple/click/
  Getting page https://pypi.org/simple/click/
  Looking up "https://pypi.org/simple/click/" in the cache
  Request header has "max_age" as 0, cache bypassed
  Starting new HTTPS connection (1): pypi.org:443
  https://pypi.org:443 "GET /simple/click/ HTTP/1.1" 304 0

With Ctrl+C pip returns a traceback:

^CCleaning up...
Removed build tracker '/tmp/pip-req-tracker-wfyq_ln0'
Operation cancelled by user
Exception information:
Traceback (most recent call last):
  File "/tmp/venv/lib/python3.5/site-packages/pip/_vendor/lockfile/mkdirlockfile.py", line 40, in acquire
    os.mkdir(self.lock_file)
FileExistsError: [Errno 17] Die Datei existiert bereits: '/home/myusername/.cache/pip/http/8/a/c/4/d/8ac4d14dc45e27d21da49fb515570b6f875b78707de9b08ce1088d1b.lock'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/venv/lib/python3.5/site-packages/pip/_internal/cli/base_command.py", line 143, in main
    status = self.run(options, args)
  File "/tmp/venv/lib/python3.5/site-packages/pip/_internal/commands/install.py", line 318, in run
    resolver.resolve(requirement_set)
  File "/tmp/venv/lib/python3.5/site-packages/pip/_internal/resolve.py", line 102, in resolve
    self._resolve_one(requirement_set, req)
  File "/tmp/venv/lib/python3.5/site-packages/pip/_internal/resolve.py", line 256, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/tmp/venv/lib/python3.5/site-packages/pip/_internal/resolve.py", line 209, in _get_abstract_dist_for
    self.require_hashes
  File "/tmp/venv/lib/python3.5/site-packages/pip/_internal/operations/prepare.py", line 218, in prepare_linked_requirement
    req.populate_link(finder, upgrade_allowed, require_hashes)
  File "/tmp/venv/lib/python3.5/site-packages/pip/_internal/req/req_install.py", line 164, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/tmp/venv/lib/python3.5/site-packages/pip/_internal/index.py", line 572, in find_requirement
    all_candidates = self.find_all_candidates(req.name)
  File "/tmp/venv/lib/python3.5/site-packages/pip/_internal/index.py", line 530, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
  File "/tmp/venv/lib/python3.5/site-packages/pip/_internal/index.py", line 675, in _get_pages
    page = self._get_page(location)
  File "/tmp/venv/lib/python3.5/site-packages/pip/_internal/index.py", line 793, in _get_page
    return _get_html_page(link, session=self.session)
  File "/tmp/venv/lib/python3.5/site-packages/pip/_internal/index.py", line 144, in _get_html_page
    "Cache-Control": "max-age=0",
  File "/tmp/venv/lib/python3.5/site-packages/pip/_vendor/requests/sessions.py", line 525, in get
    return self.request('GET', url, **kwargs)
  File "/tmp/venv/lib/python3.5/site-packages/pip/_internal/download.py", line 396, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/tmp/venv/lib/python3.5/site-packages/pip/_vendor/requests/sessions.py", line 512, in request
    resp = self.send(prep, **send_kwargs)
  File "/tmp/venv/lib/python3.5/site-packages/pip/_vendor/requests/sessions.py", line 622, in send
    r = adapter.send(request, **kwargs)
  File "/tmp/venv/lib/python3.5/site-packages/pip/_vendor/cachecontrol/adapter.py", line 53, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
  File "/tmp/venv/lib/python3.5/site-packages/pip/_vendor/requests/adapters.py", line 530, in send
    return self.build_response(request, resp)
  File "/tmp/venv/lib/python3.5/site-packages/pip/_vendor/cachecontrol/adapter.py", line 80, in build_response
    request, response
  File "/tmp/venv/lib/python3.5/site-packages/pip/_vendor/cachecontrol/controller.py", line 365, in update_cached_response
    self.cache.set(cache_url, self.serializer.dumps(request, cached_response))
  File "/tmp/venv/lib/python3.5/site-packages/pip/_internal/download.py", line 297, in set
    return super(SafeFileCache, self).set(*args, **kwargs)
  File "/tmp/venv/lib/python3.5/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py", line 126, in set
    with self.lock_class(name) as lock:
  File "/tmp/venv/lib/python3.5/site-packages/pip/_vendor/lockfile/__init__.py", line 197, in __enter__
    self.acquire()
  File "/tmp/venv/lib/python3.5/site-packages/pip/_vendor/lockfile/mkdirlockfile.py", line 57, in acquire
    time.sleep(wait)
KeyboardInterrupt

With manual lockdir removal (rmdir /home/myusername/.cache/pip/http/8/a/c/4/d/8ac4d14dc45e27d21da49fb515570b6f875b78707de9b08ce1088d1b.lock) pip continues and works again. With the argument '--no-cache-dir' pip runs as expected.

Environment

  • pip version:
$ pip --version
pip 18.1 from /tmp/venv/lib/python3.5/site-packages/pip (python 3.5)
  • Python version: 3.5.3
  • OS: Ubuntu 16.04.5 LTS

@pradyunsg
Copy link
Member

Duplicate of #3532

@pradyunsg pradyunsg marked this as a duplicate of #3532 Jan 18, 2019
@pradyunsg pradyunsg added resolution: duplicate Duplicate of an existing issue/PR and removed S: needs triage Issues/PRs that need to be triaged labels Jan 18, 2019
@lock
Copy link

lock bot commented May 30, 2019

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.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label May 30, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation resolution: duplicate Duplicate of an existing issue/PR
Projects
None yet
Development

No branches or pull requests

3 participants