[go: nahoru, domu]

Skip to content
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

pybgs .egg import issues #193

Open
Gr8Dane7 opened this issue Oct 19, 2020 · 1 comment
Open

pybgs .egg import issues #193

Gr8Dane7 opened this issue Oct 19, 2020 · 1 comment

Comments

@Gr8Dane7
Copy link

Python cannot import pybgs. After building Visual Studio 2015 ALL_BUILD (with bgs_python) the following file appears in my site_packages folder for anaconda - pybgs-3.0.0.post2-py3.7-win-amd64.egg but nothing else. When I try to import in python i get the following error:
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'pybgs'

I tried to run an easy_install to get the .egg file running but that didn't help. Why will python not import this file?

  • **Windows 10
    -**Visual Studio 2015
  • Python version 3.7.1:
@andrewssobral andrewssobral self-assigned this Jul 24, 2022
@andrewssobral
Copy link
Owner

Hi @Gr8Dane7 , sorry for my delayed feedback to you.

Usually you should have a *.pyd file instead of .egg
I just released a new version of the BGSLibrary, now v3.1.0.
I tested it on Windows, Mac and Linux, both compiling the C++ library on OpenCV 3.4.7, 3.4.16 and 4.6.0.
I also tested its respective Python wrapper and GT user interface.

Here you can see how to build it on Windows:
https://github.com/andrewssobral/bgslibrary/wiki/Installation-instructions---Windows#how-to-compile-on-windows-10--msvs2019--opencv-347

If you are still getting "No module named 'pybgs'" it's because you should update your PYTHONPATH environment variable. Note:

:: If you want the Python Wrapper
:: cmake -DOpenCV_DIR=%OpenCV_DIR% -DBGS_PYTHON_SUPPORT=ON -DBGS_CORE_STATIC=ON -G "Visual Studio 16 2019" ..
:: The Python package will be generated at %BUILD_DIR%\pybgs.cp37-win_amd64.pyd
:: You also need to add it in your PYTHONPATH.

Everything is working for me, could you please check in your side if this new version fix your issues?
Thanks in advance,
Andrews

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants