Using PIP_NO_CACHE_DIR raises exception
See original GitHub issueThis 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:
- Created 8 years ago
- Comments:13 (5 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

For what it’s worth, I’d like to say that is very confusing behaviour. Setting
PIP_CACHE=0to disable the cache would make sense, but having to setPIP_NO_CACHE_DIR=0to enable no-cache-dir is just ludicrous.Thanks @pradyunsg for the encouragement. Sorry for the delay. Have raised issue ( https://github.com/pypa/pip/issues/5735 ).