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

ModuleNotFoundError: No module named 'pdm' #1023

Closed
glorialulu opened this issue Apr 7, 2022 · 5 comments
Closed

ModuleNotFoundError: No module named 'pdm' #1023

glorialulu opened this issue Apr 7, 2022 · 5 comments
Labels
🐛 bug Something isn't working

Comments

@glorialulu
Copy link

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'}
@glorialulu glorialulu added the 🐛 bug Something isn't working label Apr 7, 2022
@glorialulu
Copy link
Author

Is there a way for me to use the updated version before the next release?

@frostming
Copy link
Collaborator

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

@glorialulu
Copy link
Author

I installed with curl. Is there a way to update with curl?

@frostming
Copy link
Collaborator

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

@glorialulu
Copy link
Author

great, this fixed my problem. (I did some cleanup after posting)

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