-
Notifications
You must be signed in to change notification settings - Fork 5
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
packing pdm itself apears only to work with python 3.11, but neither 3.9 nor 3.10 on win10 #28
Comments
I just checked on linux, here the zip app runs with python3.10. The error message on windows is.: |
I think I am mistaken, by using set PY_PYTHON=3.10 / set PY_PYTHON=3.11 /set PY_PYTHON=3.9 it is possible to quickly change the default python interpreter chosen by "py", I can not reproduce the problem with python 3.9, only with 3.10. But this confuses me as the issue was first detected on a machine that was only equipped with python 3.9... .... strange .... |
You shouldn't use |
Ok thanks, what do you mean by a "concrete" interpreter? "C:\Python310\python.exe" ? Thanks, |
I note it here as it may help others. PDM uses by default virtualenv to create virtual environments, which is great. However, it is not part of standard python. You can either install it into your environment or use venv instead. I am using venv... |
I think I know what happened... It appears as if my Visual studio code installation loads the virtual environment which was created by pdm without me noticing. (the prompt is changed, but I failed to connect this to the loading of the virtual env) a packed pdm works surprisingly well when it runs with the python from the virtual environment it created, but sync is too much, at least on windows... @frostming I would still like to understand what you mean with a concrete interpreter. On windows I have multiple python interpreters installed, but they are all named "python.exe", and the way I differentiate between them is py -3.9. C:\Python39\python.exe does not work with user installs... Thanks, |
The
|
Just curiouls @frostming This would be a very elegant solution for my problem... do I get that correctly? |
Hi,
I was succesfully able to pack pdm into a zipapp. This works nicely when I use python 3.11 to execute the zipapp.
I encountered 2 problems with the exe target.
1.) I needed to use the -i command to specify the interpreter "py" which is to my understanding the recommended way to find python on windows.
2.) on the target machine python 3.11 needs to be the default selected by "py".
The issue appears to only affect sync, not lock or search.
I would like to know if there is a possibility to specify the python version which should've used, like "py -3.11" when building an exe
This is the way I create the zipapp.:
git clone https://github.com/pdm-project/pdm.git cd pdm git checkout 2.3.4 pdm add pdm-packer pdm pack pdm pack --exe -i py.exe
Any hints?
Thanks in advance,
Franz
The text was updated successfully, but these errors were encountered: