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.

ModuleNotFoundError: No module named 'pdm'

See original GitHub issue

I encountered the following error during pdm install

Setting up with Python 3.8.10
All packages are synced to date, nothing to do.

Installing the project as an editable package...
  ✖ Install splash_finder 0.0.1 failed
  See /var/folders/j8/lqxd0sxd6416wn2wy1s_63p80000gp/T/pdm-install-fgfntctu.log for detailed debug log.
  [BackendUnavailable]: Traceback (most recent call last):
  File "/Users/luxing/opt/anaconda3/lib/python3.9/site-packages/pep517/in_process/_in_process.py", line 89, in _build_backend
    obj = import_module(mod_path)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'pdm'

  Add '-v' to see the detailed traceback
ERROR:root:Command `pdm install` failed!

This is my system information Mac-Installer:splash-finder luxing$ pdm info && pdm info --env

PDM version:        1.13.6
Python Interpreter: /Library/Developer/CommandLineTools/usr/bin/python3 (3.8)
Project Root:       /Users/luxing/Code/splash-finder
Project Packages:   /Users/luxing/Code/splash-finder/__pypackages__/3.8
{
  "implementation_name": "cpython",
  "implementation_version": "3.8.9",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "21.3.0",
  "platform_system": "Darwin",
  "platform_version": "Darwin Kernel Version 21.3.0: Wed Jan  5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T6000",
  "python_full_version": "3.8.9",
  "platform_python_implementation": "CPython",
  "python_version": "3.8",
  "sys_platform": "darwin"
}

I also tried

>>> import sysconfig
>>> print(sysconfig.get_paths(vars={'base': 'abc', 'platbase': 'abc'}))
{'stdlib': '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8', 'platstdlib': 'abc/lib/python3.8', 'purelib': 'abc/lib/python3.8/site-packages', 'platlib': 'abc/lib/python3.8/site-packages', 'include': '/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8', 'platinclude': '/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8', 'scripts': 'abc/bin', 'data': 'abc'}

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
frostmingcommented, Apr 8, 2022
curl -fsSL <script_url>|python3 - -v HEAD

But I doubt if it is installed with curl, the error tells me the library is from:

/Users/luxing/opt/anaconda3/lib/python3.9/site-packages/pep517/in_process/_in_process.py
1reaction
frostmingcommented, Apr 8, 2022

It depends on how you installed PDM. It seems you used anaconda, then:

/Users/luxing/opt/anaconda3/bin/python -m pip install -U "pdm @ git+https://github.com/pdm-project/pdm.git@main"

It should work just copy and paste

Read more comments on GitHub >

github_iconTop Results From Across the Web

ModuleNotFoundError: No module named 'pdm' #983 - GitHub
sudo python3.10 -m ensurepip returns error. python installed from debian packages or deadsnakes doesn't provide ensurepip . EDIT: I successfully ...
Read more >
ModuleNotFoundError: No module named 'pdm' - RoseIndia.Net
Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'pdm' How to remove the ModuleNotFound.
Read more >
[Fixed] ModuleNotFoundError: No module named 'platformdirs'
How to Fix “ModuleNotFoundError: No module named 'platformdirs'” in PyCharm · Open File > Settings > Project from the PyCharm menu. · Select...
Read more >
Poetry2nix no module name pdm - Help - NixOS Discourse
I'm trying to migrate a project (GitHub - Nebucatnetzer/network_inventory at poetry) to poetry and use it together with poetry2nix.
Read more >
pdm - PyPI
A modern Python package and dependency manager supporting the latest PEP standards.
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