I try to make a little GUI with pyinstaller. There seems to be a problem with the cvb import:
(py36) C:\Users\User\qtpy_test\dist\button5>button5.exe
Traceback (most recent call last):
File “button5.py”, line 8, in
File “”, line 971, in _find_and_load
File “”, line 955, in _find_and_load_unlocked
File “”, line 665, in load_unlocked
File “c:\users\User\appdata\local\conda\conda\envs\py36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py”, line 627, in exec_module
exec(bytecode, module.dict)
File "site-packages\cvb_init.py", line 20, in
StopIteration
Line 20 in the __init__py says
site_packages = next(p for p in _sys.path if ‘site-packages’ in p)
sorry for the late reply. Did you install the CVB wheel? If not, please run in a command prompt your Python 3.6 pip to install the wheel: python -m pip install %CVB%Lib\Python\cvb-1.1-cp35.cp36.cp37-none-win_amd64.whl
I am using a windows 10 machine. CVB wheel is installed trough
cvb-1.0-cp36-cp36m-win_amd64
But normally I use Python 3.8, only for cvb scripts I use Python 3.6. I got the presumption that there is maybe a problem. Is there no wheel for Python 3.8?
This dosen’t work for me. I do the following thing:
Install the cvb-1.0-cp36-cp36m-win_amd64 wheel with python 3.6. (With 3.8 I get an error message)
Copy the cvb folder from py36\lib\site-packages to Anaconda3\lib\site-packages
replace the init file
But the import in Python 3.8 still fails:
import cvb
Traceback (most recent call last):
File “”, line 1, in
import cvb
File “C:\ProgramData\Anaconda3\Lib\site-packages\cvb_init_.py”, line 32, in
import _cvb
ImportError: DLL load failed while importing _cvb: Das angegebene Modul wurde nicht gefunden.
you have to execute all the steps in the post. You want cvb to be installed to Python 3.8 , don’t you? Please install the newest version.
Then:
rename the wheel in %CVB%\Lib\Python such that Python 3.8s pip check doesn’t reject the installation by adding “cp38” to the wheels file name (i.e. “cvb-1.1-cp35.cp36.cp37.cp38-none-win_amd64.whl”)
install it via python3.8s pip installer via <yourpathtopython3.8.exe> -m pip install %CVB%\Lib\Python\cvb-1.1-cp35.cp36.cp37.cp38-none-win_amd64.whl
now replace the init file in python3.8 site-packages (find it via <yourpathtopython3.8.exe> -c “import site; print(site.getsitepackages())”) with the provided one in the post as described there.
thanks, now cvb works also in Python 3.8.
But it seem that was not the issue, the original problem with the failed pyinstaller packeting of cvb persists.
The error says that there is no site-packages in your python search path. I’m afraid this is due to the fact that you’re working on virtual environments with --no-site-packages enabled (are you?) . You may provide a bigger picture of your whole application. Is there anything similar to a site-packages path in the output of python -c “import sys; print(sys.path)” ?
I am working in the anaconda prompt. The thing is all other imports of my application work fine with pyinstaller.
If I do python -c “import cvb” cvb works fine.
with python -c “import sys; print(sys.path)” I get:
A problem we already faced with pyinstaller is, that it searches for dlls in the directory, where the pyinstaller package is built. So you may try to place CVB dlls directly in the package. You may also have a look at this.
This might be a stupid question, but what exaclty is now your error ? as you said, “there is still the same issue from the original post” - which is - please tell me if i’m wrong - that the site-packages are not found.
In order to speed this up, I have two suggestions: Either you try the steps I described before, or you make an official request to de.support@stemmer-imaging.com and describe your specific situation. I hope we will solve this soon!