-
-
Notifications
You must be signed in to change notification settings - Fork 404
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 import -f setuppy => ModuleNotFoundError: No module named 'setuptools' #1349
Comments
Install |
It is also installed in my local system by system package manager:
I have successed to run
I think pdm can't find setuptools because the option '-Es' passed to '/tmp/test/.venv/bin/python'.
I should in first install setuptools in .venv to allow |
The gist is that the default venv created by pdm does not have what it needs to make the pdm documentation make sense. The claim is seemingly that pdm can import setup.py out-of-the-box but as you've noticed that is not entirely accurate. However, you can shortcut this little issue by setting up the in-project vm using the --with-pip flag. You can also enable that globally with |
How I can use
That doesn't run:
|
It's |
The documentation indicated it is
|
You have to reinstall the venv before it will take effect.
And thank you for submitting that PR. That is actually where I pulled that information from. Shame on me for not trying it first. |
@mro-rhansen2 That runs. Thanks to have shared this tips. |
Make sure you run commands with
-v
flag before pasting the output.Steps to reproduce
run
pdm import -f setuppy noExistingFile -v
in empty dirActual behavior
Expected behavior
Environment Information
# Paste the output of `pdm info && pdm info --env` below:
$ pdm info && pdm info --env
PDM version:
2.1.3
Python Interpreter:
/tmp/test/.venv/bin/python (3.7)
Project Root:
/tmp/test
Project Packages:
None
{
"implementation_name": "cpython",
"implementation_version": "3.7.4",
"os_name": "posix",
"platform_machine": "x86_64",
"platform_release": "5.18.18",
"platform_system": "Linux",
"platform_version": "#1 SMP PREEMPT_DYNAMIC 1",
"python_full_version": "3.7.4",
"platform_python_implementation": "CPython",
"python_version": "3.7",
"sys_platform": "linux"
}
$ find /home/dev_1/.local/share/pdm/venv/lib/python3.8/site-packages/ -name setuptools
/home/dev_1/.local/share/pdm/venv/lib/python3.8/site-packages/setuptools
$ echo $PYTHONPATH
/home/dev_1/opt/python-dev_3_7/lib/python3.7/site-packages:/home/dev_1/.local/share/pdm/venv/lib/python3.8/site-packages:/home/dev_1/.local/share/pdm/venv/lib/python3.8/site-packages/pdm/pep582
The text was updated successfully, but these errors were encountered: