-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
python .dll not found in virtual environment #3942
Comments
It turns out the fail happens while inside the venv. It works once venv is deactivated. If so, how to get this working inside the venv? I do have my PATHS (python scripts and python root folder) defined as well but that doesn't seems to help inside venv. |
I am having the same issues, with Python 3.7 and PyInstaller 3.4. The following packages are installed in my virtual env:
|
@everttrollip the only way I figured out to built the single executable was to exit out of the virtual environment and the attempt to compile. That means you must have pyinstaller installed in your python install. After that just cd into the app folder and attempt to create the executable. don't enable the vevn. let me know if that helps. |
@isseykun I did exactly that and it worked fine. Just doesn't sound right that it won't work inside of a virtual environment. |
@everttrollip I couldn't figure out as to why it won't work within the env. must be due to some PATH issues that pyinstaller is unable to locate. I tried setting the variables and didn't help. Even installed the python into C:\python and didn't help either. I'm hoping the maintainers would be able to shed some light as to why. As for me, out of env, it seems to work perfectly and gets the job done. half happy 😅 |
Same issue here, After a good deal of digging it appears to be caused by a change in the cpython implementation of virtual environments. Prior to version 3.7 the |
@Loran425 awesome find 👍 Do share your results. It seems we won't be the only ones with the issue when working with py version 3.7 |
If libpython is not detected uses the dependency checker to look for a dll matching the pattern pythonXY.dll using the same method as automated detection. Checks after automated detection and only on windows systems. Fixes pyinstaller#3942
@Loran425 Thansk for tracking this down:-) |
I found that this is only a problem with the stdlib venv module, not the third-party virtualenv module (which was extra confusing when I could build successfully in a 64-bit 3.7 venv that PyCharm created for me with virtualenv, and not with a 32-bit 3.7 venv I built myself with py.exe -3.7-32 -m venv) |
@Wooble |
@senpos poetry does use venv instead of virtualenv in Python 3, so that would be consistent with what I'm seeing. |
I just ran into this exact problem on my Windows 10 system using Python 3.7.2 and Pyinstaller 3.4. I can get my application to build properly if I install all the packages in my main Python install, but it errors out with the above mentioned error when using a venv created with "python -m venv". Hope there is a fix soon for this, as I don't want to pollute my system install with packages (i.e. reason to use venv in the first place :) ) |
@robert914 I'd give the virtualenv method mentioned above by @Wobble a shot for now as it appears to work without any extra work. If that doesn't work for you there is a PR in this thread that I wrote and it fixed the issue for me if you don't mind tweaking your local install. |
@Loran425 I missed that there was a PR fix for this. I may give that a try until the upstream gets officially fixed. Thanks! As a side note, I found that when I create a new venv and upgrade PIP to 19.0.0.1, then pyinstaller no longer installs. I have to leave PIP at 18.1 and it installs fine (this is all on Windows 10). So something in PIP has broken the pyinstaller as well. Anyone else seeing this recently? I probably should open another ticket, but wasn't sure if it was a PIP problem, or a pyinstaller problem. :/ |
@Loran425 I can confirm, your patch of the PyInstaller/depend/bindepend.py file worked for me! I can deal with this minor fix since it only lives in my venv for the time being. Thanks again! |
@robert914 Thanks for confirming. |
Allow pylib detection when VERSION.dll is a dependency of python.exe rather than pythonXY.dll If libpython is not detected uses the dependency checker to look for a dll matching the pattern pythonXY.dll using the same method as automated detection. Checks after automated detection and only on windows systems. Fixes pyinstaller#3942
rather than pythonXY.dll If libpython is not detected uses the dependency checker to look for a dll matching the pattern pythonXY.dll using the same method as automated detection. Checks after automated detection and only on windows systems. Fixes pyinstaller#3942
Allow pylib detection when VERSION.dll is a dependency of python.exe rather than pythonXY.dll If libpython is not detected uses the dependency checker to look for a dll matching the pattern pythonXY.dll using the same method as automated detection. Checks after automated detection and only on windows systems. Fixes pyinstaller#3942
Allow pylib detection when VERSION.dll is a dependency of python.exe rather than pythonXY.dll If libpython is not detected uses the dependency checker to look for a dll matching the pattern pythonXY.dll using the same method as automated detection. Checks after automated detection and only on windows systems. Fixes pyinstaller#3942
Allow pylib detection when VERSION.dll is a dependency of python.exe rather than pythonXY.dll If libpython is not detected uses the dependency checker to look for a dll matching the pattern pythonXY.dll using the same method as automated detection. Checks after automated detection and only on windows systems. Fixes pyinstaller#3942
Allow pylib detection when VERSION.dll is a dependency of python.exe rather than pythonXY.dll If libpython is not detected uses the dependency checker to look for a dll matching the pattern pythonXY.dll using the same method as automated detection. Checks after automated detection and only on windows systems. Fixes pyinstaller#3942
Since "venv" is apparently broken in conjunction with PyInstaller. See pyinstaller/pyinstaller#3942
Allow pylib detection when VERSION.dll is a dependency of python.exe rather than pythonXY.dll If libpython is not detected uses the dependency checker to look for a dll matching the pattern pythonXY.dll using the same method as automated detection. Checks after automated detection and only on windows systems. Fixes pyinstaller#3942
Hi all, Any idea when the a new version will be released. This PR made my life a lot easier, and being able to install PyInstaller from PyPi.org again would be awesome! |
I've not seen it mentioned in this thread, but the workaround of using Here's also hoping for a new release soon! |
* Add requests requirement to bypass a bug with old version and urllib3 >= 1.25; (see https://github.com/kennethreitz/requests/issues/5067) * Use a development branch of PyInstaller to bypass a vevn bug; (see pyinstaller/pyinstaller#3942) * Remove pip 18 requirement, there is no more issue here.
* Add requests requirement to bypass a bug with old version and urllib3 >= 1.25; (see https://github.com/kennethreitz/requests/issues/5067) * Use a development branch of PyInstaller to bypass a vevn bug; (see pyinstaller/pyinstaller#3942) * Remove pip 18 requirement, there is no more issue here. I needed to fix fix_app_qt_folder_names_for_codesign.py as it was yielding files and folders in a random manner and was trying to fix non-DLL files.
* Add requests requirement to bypass a bug with old version and urllib3 >= 1.25; (see https://github.com/kennethreitz/requests/issues/5067) * Use a development branch of PyInstaller to bypass a vevn bug; (see pyinstaller/pyinstaller#3942) * Remove pip 18 requirement, there is no more issue here. I needed to fix fix_app_qt_folder_names_for_codesign.py as it was yielding files and folders in a random manner and was trying to fix non-DLL files.
* Add requests requirement to bypass a bug with old version and urllib3 >= 1.25; (see https://github.com/kennethreitz/requests/issues/5067) * Use a development branch of PyInstaller to bypass a vevn bug; (see pyinstaller/pyinstaller#3942) * Remove setuptools and pip 18 requirement, there is no more issue here. * Fixed fix_app_qt_folder_names_for_codesign.py as it was yielding files and folders in a random manner and was trying to fix non-DLL files.
* Add requests requirement to bypass a bug with old version and urllib3 >= 1.25; (see https://github.com/kennethreitz/requests/issues/5067) * Use a development branch of PyInstaller to bypass a vevn bug; (see pyinstaller/pyinstaller#3942) * Remove setuptools and pip 18 requirement, there is no more issue here. * Fixed fix_app_qt_folder_names_for_codesign.py as it was yielding files and folders in a random manner and was trying to fix non-DLL files.
I am getting the same error using cx_Freeze, any suggestions? |
pyinstaller fails with the following error
I have been trying to get this work on windows10 running Python 3.7.2 (x32)
The following are the packages installed
The text was updated successfully, but these errors were encountered: