question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using PIP_NO_CACHE_DIR raises exception

See original GitHub issue

This is related to #2855 and #2856. #2856 fixed the exception when using --no-cache-dir flag, but using the equivalent env var still doesn’t work:

$ PIP_NO_CACHE_DIR=1 pip install gunicorn
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.3/site-packages/pip-7.0.3-py3.3.egg/pip/basecommand.py", line 223, in main
    status = self.run(options, args)
  File "/usr/lib/python3.3/site-packages/pip-7.0.3-py3.3.egg/pip/commands/install.py", line 242, in run
    with self._build_session(options) as session:
  File "/usr/lib/python3.3/site-packages/pip-7.0.3-py3.3.egg/pip/basecommand.py", line 71, in _build_session
    if options.cache_dir else None
  File "/usr/lib64/python3.3/posixpath.py", line 82, in join
    elif not path or path.endswith(sep):
AttributeError: 'int' object has no attribute 'endswith'

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

14reactions
brechtmcommented, Dec 15, 2016

For what it’s worth, I’d like to say that is very confusing behaviour. Setting PIP_CACHE=0 to disable the cache would make sense, but having to set PIP_NO_CACHE_DIR=0 to enable no-cache-dir is just ludicrous.

1reaction
jakirkhamcommented, Aug 24, 2018

Thanks @pradyunsg for the encouragement. Sorry for the delay. Have raised issue ( https://github.com/pypa/pip/issues/5735 ).

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is pip's `--no-cache-dir` good for? - Stack Overflow
I think there is a good reason to use --no-cache-dir when you are building Docker images. The cache is usually useless in a...
Read more >
Release Notes — pip 8.1.1 documentation
Fix regression with non-ascii requirement files on Python 2 and add ... Fixed a regression where --no-cache-dir would raise an exception, fixes #2855....
Read more >
pip install sp api - Caseificio de Nicola
Constraints files pip install pyspark [ sql] For PySpark with/without a ... instead of using the files from your pip cache, add the...
Read more >
Frequently Encountered Pipenv Problems - Read the Docs
☤ An exception is raised during Locking dependencies… ¶ ... Run pipenv lock --clear and try again. The lock sequence caches results to...
Read more >
DiskCache Tutorial - Grant Jenks
As a Cache, it supports a familiar Python mapping interface with ... When a Timeout error occurs in Cache methods, the exception may...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found