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

PDM AssertionError #922

Closed
liaoran opened this issue Feb 18, 2022 · 1 comment
Closed

PDM AssertionError #922

liaoran opened this issue Feb 18, 2022 · 1 comment
Labels
🐛 bug Something isn't working

Comments

@liaoran
Copy link

liaoran commented Feb 18, 2022

OS: Ubuntu 20.04.3 LTS
Python Version: 3.8.10
PDM Version: 1.13.0.post0
According to the official documentation, when using "pdm init" command in a new folder, the following error is reported:

Traceback (most recent call last):
  File "/home/programmer/.local/bin/pdm", line 8, in <module>
    sys.exit(main())
  File "/home/programmer/.local/lib/python3.8/site-packages/pdm/core.py", line 233, in main
    return Core().main(args)
  File "/home/programmer/.local/lib/python3.8/site-packages/pdm/core.py", line 180, in main
    check_update(options.project)
  File "/home/programmer/.local/lib/python3.8/site-packages/pdm/cli/actions.py", line 790, in check_update
    latest_version = get_latest_version(project)
  File "/home/programmer/.local/lib/python3.8/site-packages/pdm/cli/actions.py", line 767, in get_latest_version
    candidate = get_finder([]).find_best_candidate("pdm")
  File "/home/programmer/.local/lib/python3.8/site-packages/pdm/utils.py", line 124, in get_finder
    finder = get_package_finder(
  File "/home/programmer/.local/lib/python3.8/site-packages/pdm/models/pip_shims.py", line 69, in get_package_finder
    session = install_cmd._build_session(options)
  File "/home/programmer/.local/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 88, in _build_session
    assert not options.cache_dir or os.path.isabs(options.cache_dir)
AssertionError
@liaoran liaoran added the 🐛 bug Something isn't working label Feb 18, 2022
@frostming
Copy link
Collaborator

frostming commented Feb 18, 2022

Do you set PIP_CACHE in env or pip.conf?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants