I have created a program in python where it call's an external python 
module from a commercial program. As far i have come in my analyses, I have 
to mentioned I am not a programmer or an expert, this module is a python 
over C. The lib is in pyd extension and in order to be call in the python 
script it has to have a environment variable call pythonpath an only can be 
used in python 3.4 or 3.5. I manage to circumvent this by using sys.path.
insert(0, path) where path is the path to the module to be load or call 
without going through environment variable or the need to have it defined. 
The module structure is as follows:


caris\ 

         __init__.py 

         _py_caris.pyd

caris\

         __pycache__\

                                ......

caris\

         bathy\

                    .....

caris\

         coverage\

                          ....

caris\

         ui\

              ....

My script has a PyQt5 gui and runs over or is a "wrapper" over this module. 
When compiling with pyinstaller the processed starts with a bat file.



"C:\Program Files\Python35\Scripts\pyinstaller.exe" -n "Point Cloud" --clean -y 
^ -c --debug=imports ^ --exclude-module=caris ^ 
--add-data="ReadAPointCloudFromAPLYFileExample_01.png;." ^ ^ 
--icon=Point_Cloud.ico ^ PC.py







Have tried some variations but no improvement.


This is snip from the output if i do not use --exclude-module=caris when 
compiling.


import search # PyInstaller PYZ
# caris not found in PYZ
# bytecode is stale for 'caris'
# code object from C:\Program Files\CARIS\BASE 
Editor\5.3\python\3.5\caris\__init__.py
# caris._py_caris not found in PYZ
Traceback (most recent call last):
  File "PC.py", line 19, in <module>
  File "<frozen importlib._bootstrap>", line 968, in _find_and_load
  File "<frozen importlib._bootstrap>", line 957, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "c:\program 
files\python35\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", 
line 623, in exec_module
    exec(bytecode, module.__dict__)
  File "search.py", line 7, in <module>
  File "<frozen importlib._bootstrap>", line 968, in _find_and_load
  File "<frozen importlib._bootstrap>", line 957, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 697, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in 
_call_with_frames_removed
  File "C:\Program Files\CARIS\BASE Editor\5.3\python\3.5\caris\__init__.py"
, line 15, in <module>
    from ._py_caris import *
  File "<frozen importlib._bootstrap>", line 968, in _find_and_load
  File "<frozen importlib._bootstrap>", line 957, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 577, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 938, in create_module
  File "<frozen importlib._bootstrap>", line 222, in 
_call_with_frames_removed
ImportError: DLL load failed: Impossível localizar o procedimento 
especificado.
[9712] Failed to execute script PC


My questions are:

Why PYZ has a problem with caris._py_caris? What I'm doing wrong or is this 
a bug? 

caris._py_caris is the caris._py_caris.pyd could this be a problem for 
Pyinstaller? 

Is this a correct why to do it?

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/083ec75e-e484-4dd9-9a34-e26ff35f3a96%40googlegroups.com.

Reply via email to