Re: [PyInstaller] Missing Attribute (Really annoying)

2019-08-14 Thread ronin
Hi,

Sorry for late response. In my case, missing attribute is also a problem about 
imports. Library is imported but its submodules are not present. The easiest 
solution is, if there is any missing attributes in library it needs to be 
specified like hidden import. (pysunspec library had this problem)

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/121ec3a0-4386-4ba4-a6f9-1e6a24eaf6bf%40googlegroups.com.


[PyInstaller] Re: Missing Attribute (Really annoying)

2019-08-14 Thread ronin
Hi, 
 Did you solve problem or you have the same problem. Every library that 
contains missing attribute needs to be specified as hidden import, there is no 
limitation. If you are facing with the same problem i can help. Also there is 
some other libraries that can solve your problem like cx_freeze but most 
probably you will face same kind of problems with different ways of solutions. 

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/02b0253d-0a48-4e36-ba8f-6039f816429d%40googlegroups.com.


[PyInstaller] dist .exe does not seem to be self-contained, only runs in original location

2019-08-14 Thread Ken Sullivan
I'm running into a runtime error when trying to run the pyinstaller 
generated executable on another machine, or the same machine but dist 
directory has moved, or even just called from a lower subdirectory, e.g. 
*D:\>*base-folder\project\dist\main\main.exe instead of 
*D:\base-folder\project\dist\main>*main.exe (though 
*D:\base-folder\project>*dist\main\main.exe works). The error trace is:

Traceback (most recent call last):
  File "site-packages\pbr\version.py", line 442, in 
_get_version_from_pkg_resources
  File "site-packages\pkg_resources\__init__.py", line 352, in get_provider
  File "site-packages\pkg_resources\__init__.py", line 895, in require
  File "site-packages\pkg_resources\__init__.py", line 781, in resolve
pkg_resources.DistributionNotFound: The 'mock' distribution was not found 
and is required by the application

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "project\main.py", line 23, in 
  File "", line 971, in _find_and_load
  File "", line 955, in _find_and_load_unlocked
  File "", line 665, in _load_unlocked
  File 
"D:\WPy-3670-1.1b\python-3.6.7.amd64\lib\site-packages\PyInstaller\loader\pyimod03_importers.py",
 
line 627, in exec_module
exec(bytecode, module.__dict__)
  File "NiftyNet\niftynet\__init__.py", line 46, in 
  File "", line 971, in _find_and_load
  File "", line 955, in _find_and_load_unlocked
  File "", line 665, in _load_unlocked
  File 
"D:\WPy-3670-1.1b\python-3.6.7.amd64\lib\site-packages\PyInstaller\loader\pyimod03_importers.py",
 
line 627, in exec_module
exec(bytecode, module.__dict__)
  File "NiftyNet\niftynet\io\misc_io.py", line 14, in 
  File "", line 971, in _find_and_load
  File "", line 955, in _find_and_load_unlocked
  File "", line 665, in _load_unlocked
  File 
"D:\WPy-3670-1.1b\python-3.6.7.amd64\lib\site-packages\PyInstaller\loader\pyimod03_importers.py",
 
line 627, in exec_module
exec(bytecode, module.__dict__)
  File "site-packages\nibabel\__init__.py", line 74, in 
  File "", line 971, in _find_and_load
  File "", line 955, in _find_and_load_unlocked
  File "", line 665, in _load_unlocked
  File 
"D:\WPy-3670-1.1b\python-3.6.7.amd64\lib\site-packages\PyInstaller\loader\pyimod03_importers.py",
 
line 627, in exec_module
exec(bytecode, module.__dict__)
  File "site-packages\mock\__init__.py", line 2, in 
  File "", line 971, in _find_and_load
  File "", line 955, in _find_and_load_unlocked
  File "", line 665, in _load_unlocked
  File 
"D:\WPy-3670-1.1b\python-3.6.7.amd64\lib\site-packages\PyInstaller\loader\pyimod03_importers.py",
 
line 627, in exec_module
exec(bytecode, module.__dict__)
  File "site-packages\mock\mock.py", line 71, in 
  File "site-packages\pbr\version.py", line 462, in semantic_version
  File "site-packages\pbr\version.py", line 449, in 
_get_version_from_pkg_resources
  File "site-packages\pbr\packaging.py", line 874, in get_version
Exception: Versioning for this project requires either an sdist tarball, or 
access to an upstream git repository. It's also possible that there is a 
mismatch between the package name in setup.cfg and the argument given to 
pbr.version.VersionInfo. Project name mock was given, but was not able to 
be found.

If I run with --debug=imports, the lines immediatly preceding the exception 
are:
import 'sphinx.setup_command' # 
import 'pbr.builddoc' # 
import 'pbr.packaging' # 

When it works (ran in original location), those lines are followed with:
import 'mock.mock' # 
import 'mock' # 


I wasn't able to get it to complete with --debug=all.

pyinstaller is installed and ran within a WinPython command prompt. I had 
to edit the .spec file to increase the recursionlimit to 5000, and to add 
some hiddenimports. Other than that no options passed. OS is Windows 10, 
64-bit.

Anything I could be doing wrong, or anything to try?


-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/c47b5208-e3dc-456d-a9da-c70603255926%40googlegroups.com.


[PyInstaller] dist .exe does not seem to be self-contained, only runs in original location

2019-08-14 Thread Ken Sullivan
I'm running into a runtime error when trying to run the pyinstaller 
generated executable on another machine, or the same machine but dist 
directory has moved, or even just called from a lower subdirectory, e.g. 
D:\> base-folder\project\dist\main\main.exe instead of 
D:\base-folder\project\dist\main> main.exe (though D:\base-folder\project> 
dist\main\main.exe works). The error trace is:

Traceback (most recent call last):
  File "site-packages\pbr\version.py", line 442, in 
_get_version_from_pkg_resources
  File "site-packages\pkg_resources\__init__.py", line 352, in get_provider
  File "site-packages\pkg_resources\__init__.py", line 895, in require
  File "site-packages\pkg_resources\__init__.py", line 781, in resolve
pkg_resources.DistributionNotFound: The 'mock' distribution was not found 
and is required by the application

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "project\main.py", line 23, in 
  File "", line 971, in _find_and_load
  File "", line 955, in _find_and_load_unlocked
  File "", line 665, in _load_unlocked
  File 
"D:\WPy-3670-1.1b\python-3.6.7.amd64\lib\site-packages\PyInstaller\loader\pyimod03_importers.py",
 
line 627, in exec_module
exec(bytecode, module.__dict__)
  File "NiftyNet\niftynet\__init__.py", line 46, in 
  File "", line 971, in _find_and_load
  File "", line 955, in _find_and_load_unlocked
  File "", line 665, in _load_unlocked
  File 
"D:\WPy-3670-1.1b\python-3.6.7.amd64\lib\site-packages\PyInstaller\loader\pyimod03_importers.py",
 
line 627, in exec_module
exec(bytecode, module.__dict__)
  File "NiftyNet\niftynet\io\misc_io.py", line 14, in 
  File "", line 971, in _find_and_load
  File "", line 955, in _find_and_load_unlocked
  File "", line 665, in _load_unlocked
  File 
"D:\WPy-3670-1.1b\python-3.6.7.amd64\lib\site-packages\PyInstaller\loader\pyimod03_importers.py",
 
line 627, in exec_module
exec(bytecode, module.__dict__)
  File "site-packages\nibabel\__init__.py", line 74, in 
  File "", line 971, in _find_and_load
  File "", line 955, in _find_and_load_unlocked
  File "", line 665, in _load_unlocked
  File 
"D:\WPy-3670-1.1b\python-3.6.7.amd64\lib\site-packages\PyInstaller\loader\pyimod03_importers.py",
 
line 627, in exec_module
exec(bytecode, module.__dict__)
  File "site-packages\mock\__init__.py", line 2, in 
  File "", line 971, in _find_and_load
  File "", line 955, in _find_and_load_unlocked
  File "", line 665, in _load_unlocked
  File 
"D:\WPy-3670-1.1b\python-3.6.7.amd64\lib\site-packages\PyInstaller\loader\pyimod03_importers.py",
 
line 627, in exec_module
exec(bytecode, module.__dict__)
  File "site-packages\mock\mock.py", line 71, in 
  File "site-packages\pbr\version.py", line 462, in semantic_version
  File "site-packages\pbr\version.py", line 449, in 
_get_version_from_pkg_resources
  File "site-packages\pbr\packaging.py", line 874, in get_version
Exception: Versioning for this project requires either an sdist tarball, or 
access to an upstream git repository. It's also possible that there is a 
mismatch between the package name in setup.cfg and the argument given to 
pbr.version.VersionInfo. Project name mock was given, but was not able to 
be found.


If I run with --debug=imports, the lines immediatly preceding the exception 
are:
import 'sphinx.setup_command' # 
import 'pbr.builddoc' # 
import 'pbr.packaging' # 

When it works (ran in original location), those lines are followed with:
import 'mock.mock' # 
import 'mock' # 


I wasn't able to get it to complete with --debug=all.

pyinstaller is installed and ran within a WinPython command prompt. I had 
to edit the .spec file to increase the recursionlimit to 5000, and to add 
some hiddenimports. OS is Windows 10, 64-bit.

Anything I could be doing wrong, or anything to try?


-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/95d39168-5818-4629-8397-dbd2d29706a2%40googlegroups.com.