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
'six' is required; worked fine with previous version of pyinstaller #1773
Comments
To solve, in spec file, I hadd to add the followings in hidden imports: hiddenimports=['six','packaging', 'packaging.version', 'packaging.specifiers'], |
This seams to be an issue with setuptools 19.3, see #1772 (comment). Please try downgrading setuptools to 19.2 and report back if this solved the issue in your case, too. |
Downgrading to setuptools==19.2 fixed this issue for me. |
Same problem here, I fixed this with a new hook script for the vendor hack inside pkg_resources: (loco2-precise)torsten.landschoff@horatio:~/opensrc/pyinstaller$ git diff --cached
diff --git a/PyInstaller/hooks/hook-pkg_resources.py b/PyInstaller/hooks/hook-pkg_resources.py
new file mode 100644
index 0000000..cff9036
--- /dev/null
+++ b/PyInstaller/hooks/hook-pkg_resources.py
@@ -0,0 +1,6 @@
+def list_vendored_modules():
+ from pkgutil import walk_packages
+ import pkg_resources._vendor
+ return ["pkg_resources._vendor.{1}".format(*x) for x in walk_packages(pkg_resources._vendor.__path__)]
+
+hiddenimports = list_vendored_modules() |
@Bluehorn Would you pleas be so kind submitting a pull-request, so you'll get the credits for this fix. (I'm going to prepare release 3.1.1 in the meanwhile). |
@Bluehorn Just a quick question: This code basically collects
|
@htgoebel Thanks, I did not know of |
Workaround for https://bitbucket.org/anthony_tuininga/cx_freeze/issues/175/ Also see pyinstaller/pyinstaller#1773 This hopefully fixes AppVeyor builds.
The fix doesn't solve the issue to me. I get the same issue using pyinstaller 3.1.1 and python 3.5.1 using Anaconda. |
I am seeing the same issue as @smartswdeveloper using pyinstaller 3.1.1 and python 2.7.11 with Anaconda on both Windows and Mac OS X. Needed to downgrade setuptools in order to get it to run correctly. I suggest re-opening this issue, or I can create a new one. |
Same problem, python 3.5.1 with Anaconda on Windows. I think we should re-open this issue. |
+1 for re-opening. Anaconda distribution of Python 2.7.11 on Windows; downgrading setuptools to 19.2 fixed the problem for me. |
Doing a bit of looking, on my Windows PC and current PyInstaller (see below), >>> import pkg_resources
>>> print(pkg_resources.__file__)
e:\enki_all\codechat\setuptools-20.9.0-py3.4.egg\pkg_resources\__init__.py
>>> Deleting the .egg file shown above causes Python to find the non-.egg version: >>> import pkg_resources
>>> pkg_resources.__file__
'C:\\Users\\bjones\\Downloads\\WinPython-32bit-3.4.4.1Qt5\\python-3.4.4\\lib\\site-packages\\pkg_resources\\__init__.py'
>>> After this, the error goes away. Long term fix: rewrite Version info:
|
On a recent Ubuntu (16.04), we were hitting this error: <pyinstaller/pyinstaller#1773> This should work-around the problem.
Dear devs, I have faced the same issue with python 3.5.1 using miniconda 3. My fix is just to extract setuptools-20.3-py3.5.egg as setuptools in site-packages, and change the setuptools.pth file to ".\setuptools". Building successful with pyinstaller 3.1.1 (why does pyinstaller 3.2 fail to look for binary dependencies of several api-ms dlls with the same code?). Can this considered a valid solution or extracting the setuptools-20.3-py3.5.egg can trigger additional side-effects? All the best and thank you! |
@bjones1 This may be a workaround for a simple package, but I'm getting errors for a program which doesn't use NumPy: https://github.com/ronanpaixao/PyPDFTK/ When generating it also goes from 13MB (with setuptools 19.2, working) to 30MB (with setuptools 26.1.1, non-working). Maybe it's importing some troublesome package? PyPDFTK is pretty much PyQt and PyPDF2. I'm also trying my spec file in a simpler project and it works fine. Maybe PyPDF2 is another culprit? |
First follow the steps at https://github.com/pyinstaller/pyinstaller/wiki/How-to-Report-Bugs. It's hard to tell if this is related or not. |
@smartswdeveloper Your fix, resolved my issue. Any idea ? |
I get this when I run the built executable. It worked fine when built with the previous version of
pyinstaller
.The text was updated successfully, but these errors were encountered: