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.

pip version check raises an exception internally when using `--no-cache-dir`

See original GitHub issue

Environment

  • 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

  1. Run pip install --no-cache-dir --verbose wheel
  2. 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:closed
  • Created 5 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
pradyunsgcommented, Sep 5, 2018

Reproduced as per OP’s instructions. Working on this.

1reaction
segevfinercommented, Jul 31, 2018

I saw the same TypeError with a different command, here.

#5680 fixes that exception… but then there is another one! 😝

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 115, in pip_version_check
    find_links=options.find_links,
AttributeError: 'Values' object has no attribute 'find_links'

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.

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 >
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 >

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