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.

Problems with pdm 1.5.1 when installed/upgraded via pipx

See original GitHub issue
  • I have searched the issue tracker and believe that this is not a duplicate.

Steps to reproduce

I was happily using pdm in various versions before 1.5.0 (even 1.5.0b’s) which I installed/upgraded using pipx. When I do an pipx upgrade-all which brings pdm to 1.5.1, I get an error message when tryping to install any package:

Error occurs
Traceback (most recent call last):
  File "c:\users\z001y9xs\.local\pipx\venvs\pdm\lib\site-packages\pdm\termui.py", line 189, in logging
    yield logger
  File "c:\users\z001y9xs\.local\pipx\venvs\pdm\lib\site-packages\pdm\installers\synchronizers.py", line 301, in synchronize
    with self.ui.logging("install"), self.environment.activate():
  File "c:\python37\lib\contextlib.py", line 112, in __enter__
    return next(self.gen)
  File "c:\users\z001y9xs\.local\pipx\venvs\pdm\lib\site-packages\pdm\models\environment.py", line 131, in activate
    bin_py = req_uninstall.bin_py
AttributeError: module 'pip._internal.req.req_uninstall' has no attribute 'bin_py'

A pipx reinstall did not help. The only mitigation was to remove pdm and install it without pipx.

Environment Information

I had the same issue on both Windows and Python using both Python 3.7 and 3.8.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
frostmingcommented, Apr 27, 2021

See #412 , the workaround is to downgrade the pip to <21.1 inside the pipx managed venv.

The release with a fix will be out this week.

2reactions
linw1995commented, Apr 27, 2021

Or you can install the HEAD of the master branch version to acquire this fix by executing these commands.

pipx uninstall pdm
pipx install "git+https://github.com/pdm-project/pdm.git@master#egg=pdm"
Read more comments on GitHub >

github_iconTop Results From Across the Web

pip 21.1 breaks pdm install · Issue #412 - GitHub
I have searched the issue tracker and believe that this is not a duplicate. ... Problems with pdm 1.5.1 when installed/upgraded via pipx...
Read more >
Troubleshooting - pipx
Troubleshooting · reinstall-all fixes most issues · Diagnosing problems using list · Specifying pipx options · Check for PIP_* environment variables · pipx...
Read more >
pdm - PyPI
A modern Python package and dependency manager supporting the latest PEP standards.
Read more >
PDM: Home
PDM, as described, is a modern Python package and dependency manager supporting the latest PEP standards. But it is more than a package...
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