pip version check raises an exception internally when using `--no-cache-dir`
See original GitHub issueEnvironment
- pip version: 18.0 (& master)
- Python version: 3.7.0 x64
- OS: Windows 10.0.17134.165 x64
Description
If you use --no-cache-dir
, the pip version check will raise an exception that will be swallowed internally.
Expected behavior The version check should work normally, or be disabled. There shouldn’t be an exception.
How to Reproduce
- Run
pip install --no-cache-dir --verbose wheel
- Check the output.
Output
>pip install --no-cache-dir --verbose wheel
Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
Created temporary directory: C:\Users\User\AppData\Local\Temp\pip-ephem-wheel-cache-2e5wmnq3
Created temporary directory: C:\Users\User\AppData\Local\Temp\pip-req-tracker-gnigbooj
Created requirements tracker 'C:\\Users\\User\\AppData\\Local\\Temp\\pip-req-tracker-gnigbooj'
Created temporary directory: C:\Users\User\AppData\Local\Temp\pip-install-u77xlkpb
Requirement already satisfied: wheel in c:\users\user\prj\pip\venv\lib\site-packages (0.31.1)
Cleaning up...
Removed build tracker 'C:\\Users\\User\\AppData\\Local\\Temp\\pip-req-tracker-gnigbooj'
There was an error checking the latest version of pip
Traceback (most recent call last):
File "c:\users\user\prj\pip\src\pip\_internal\utils\outdated.py", line 90, in pip_version_check
state = SelfCheckState(cache_dir=options.cache_dir)
File "c:\users\user\prj\pip\src\pip\_internal\utils\outdated.py", line 25, in __init__
self.statefile_path = os.path.join(cache_dir, "selfcheck.json")
File "C:\Users\user\prj\pip\venv\lib\ntpath.py", line 76, in join
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not bool
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (9 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 >Installation - Pillow (PIL Fork) 9.3.0 documentation
Pillow has been tested with version 0.1.3, which does not read ... clear the pip cache or build without cache using the --no-cache-dir...
Read more >Python - PIP | i2tutorials
Python newest versions come with pip installed by default, this tutorial shows you how to install Pip, check its version, and show some...
Read more >Fail to retrieve package from pypi.org though Azure Artifacts ...
Hello,. I am trying to install the pypi package using Artifacts on Azure DevOps 2019 Update1.1. The package cannot be retrieved due to...
Read more >pip Documentation
pip works with CPython versions 2.6, 2.7, 3.3, 3.4, ... Fixed a regression where --no-cache-dir would raise an exception, fixes #2855.
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
Reproduced as per OP’s instructions. Working on this.
#5680 fixes that exception… but then there is another one! 😝
It tries to query for options that don’t exist in the show command. This likely applies to all command that don’t have these options and trigger a version check.