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 'dep_logic' with new pdm 2.19.0 release #3178

Closed
1 task done
toppk opened this issue Sep 23, 2024 · 2 comments
Closed
1 task done
Labels
🐛 bug Something isn't working

Comments

@toppk
Copy link

toppk commented Sep 23, 2024

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

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

echo rm -rf .venv # start with empty venv
pdm sync

I think there's a chicken and egg problem here, where the .venv cannot be bootstrapped due to missing dep_logic module.

Probably related to this:

#3176

Environment Information

# Paste the output of `pdm info && pdm info --env` below:
$ pdm info
PDM version:
  2.19.0
Python Interpreter:
  /home/toppk/workspace/ratetick/pygrid/.venv/bin/python (3.11)
Project Root:
  /home/toppk/workspace/ratetick/pygrid
Local Packages:
$ pdm info --env
Traceback (most recent call last):
  File "/home/toppk/.local/lib/python3.11/site-packages/pdm/models/in_process/env_spec.py", line 24, in <module>
    print(json.dumps(get_current_env_spec(sys.argv[1]), indent=2))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/toppk/.local/lib/python3.11/site-packages/pdm/models/in_process/env_spec.py", line 12, in get_current_env_spec
    from dep_logic.tags import Platform
ModuleNotFoundError: No module named 'dep_logic'
[CalledProcessError]: Command 
'['/home/toppk/workspace/ratetick/pygrid/.venv/bin/python', '-EsS', 
'/home/toppk/.local/lib/python3.11/site-packages/pdm/models/in_process/env_spec.
py', '/usr/local/lib/python3.11/site-packages']' returned non-zero exit status 
1.
WARNING: Add '-v' to see the detailed traceback
@toppk toppk added the 🐛 bug Something isn't working label Sep 23, 2024
@frostming
Copy link
Collaborator

I can't reproduce locally. Can you make a clean docker environment for reproduction?

And dep_logic should exist under /home/toppk/.local/lib/python3.11/site-packages/ and the path is loaded here:

site.addsitedir(shared_lib)

Can you help make me more clear since the above doesn't make sense.

@frostming
Copy link
Collaborator

frostming commented Sep 23, 2024

Fine, you are installing pdm into the user site and the path is not loaded

frostming added a commit that referenced this issue Sep 23, 2024
Close #3178

Signed-off-by: Frost Ming <me@frostming.com>
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