-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[BUG] Users report problems with installing modules when they have the latest 3.0.9 version of pyparsing installed #3451
Comments
I use windows 11, python 3.9.12 and setuptools version 63.2.0 and pyparsing 3.0.9 versions and got that error. I make an executable with a main python file and a sub file. Before updating the above mentioned package, I got an other error, where suggested to update them. Besides the 2 python files, for my app I have a: png file, an ico file, and three modules: customtkinter, openpyxl and treepoem |
The pyparsing 3.0.8 code that references the missing file is (see changes in pyparsing/pyparsing@f655b95)
The vendored version includes template.jinja2 where it is expected, but in pyparsing 3.0.9, this file no longer exists. Why would the vendored pyparsing be looking for template.jinja2 in the installed 3.0.9 pyparsing? |
|
Will releasing a new pyparsing version containing the file resolve this issue? I don't mind doing it, but I'd at least like to know why doing it fixes this problem. |
Hi @ptmcg thank you very much for reporting this. I imagine that the best action here would be provide a fix on the setuptools end. Probably an update of the bundled version of pyparsing is the easiest thing to do.
Setuptools uses a |
Given pyparsing's rollercoaster releases since 3.0.0, I wanted to double-check how much risk you would be looking at in upping to 3.0.9. The CHANGES log doesn't show any changes to internal parsing or whitespace-skipping (the two areas that give most problems in updating), mostly type annotations and doc string updates. And the one file deletion, of course. So I think an update in setuptools to pyparsing 3.0.9 is a safe option. (By comparison, 3.0.10 will have more extensive changes, so it will take a little more deliberation before jumping on it.) |
In #3453, I am proposing to update the version of the vendored However, to investigate this issue deeply (and see if there is anything else we can do) I would need a proper minimal reproduction, which seems to be missing in the original ticket... (I saw the original problem involves pyinstaller... Does it mean that the error just happens with pyinstaller? I tried to have both packages installed in the reported versions inside the same directory and everything seems to be fine...). |
Thank you very much @ptmcg, this is very valuable information! |
Thank you very much @jpp08022002. I was looking for something that reduces the amount of moving parts... The original issue mentions only PyInstaller (no Anaconda, auto-py-to-exe, gui's etc)... I tried the following: # powershell
python -m virtualenv .venv
.venv\Scripts\python -m pip install 'setuptools==63.2.0' 'wheel==0.37.1' 'pip==22.1.0' 'pyparsing==3.0.9' 'pyinstaller==5.1'
mkdir testpkg
cd testpkg
echo "import pyparsing; print('hello world')" | out-file cli.py -encoding utf8
..\.venv\Scripts\pyinstaller cli.py --onefile
.\dist\cli.exe
# hello world And everything seems to be fine... |
I still got the same error! I don't know very much about packages, but I want to make my python file executable with treepoem, customtkinter and openpyxl. This raised the above mentioned error and makes my executable not working! |
@jpp08022002 It seems that the actual code in your files is relevant to reproducing this problem. Is this code in a public Github repository? I know it is frustrating that @abravalheri is unable to reproduce a problem that is clearly reproducible to you. But they have tried their best with the information you have provided. If there is any way that you can whittle down the problem on your end - such as pruning proces_excel_main_module.py down to just the smallest bit of code that still creates the problem - and then try reproducing just with pyinstaller without bringing in more tools, Anaconda, etc. Going through this process to create a Minimal Reproducible Example will help you isolate what particular feature is causing the problem, and documenting the environment setup steps and providing the minimal code will give @abravalheri a much better platform for reproducing it on their end. |
Thank you guys (sorry if it took me some time, I was in holidays meanwhile). I upgraded the vendored version of pyparsing to fix the issue (even if we don't fully understand what is happening). It should be available in a new release soon. If at some point in the future someone would like to contribute with a minimal reproducer for the specific version of setuptools that was causing the problem, we can still try to investigate it deeper. |
setuptools version
62.6.0 and "latest"
Python version
Unknown
OS
Unknown
Additional environment information
Users report problems with installing modules when they have the latest 3.0.9 version of pyparsing installed.
pyparsing/pyparsing#419
Description
Somehow, the vendored version of pyparsing (3.0.8) references a file (template.jinja2) which exists in the pkg_resources vendored version of pyparsing but has been removed in the latest version of pyparsing (3.0.9).
One user reports:
A second user reports:
Expected behavior
Expect installs with no warnings, since the vendored pyparsing does contain the template.jinja2 file.
How to Reproduce
Descriptions in pyparsing/pyparsing#419. I will instruct those reporting on that bug to add further details here.
Output
See Description above.
The text was updated successfully, but these errors were encountered: