-
-
Notifications
You must be signed in to change notification settings - Fork 745
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
Cmake(?) error when running pip install pybgs on Windows #229
Comments
Hello @monviso , Compiling the bgslibrary on windows requires some preliminary steps, please see the links below:
You need a few requirements like:
You should install the OpenCV library (https://opencv.org/releases/) , then configure the env var OpenCV_DIR, see some info below: Ps.: you may need to update some PATHs to match your environment) git clone --recursive https://github.com/andrewssobral/bgslibrary.git
cd bgslibrary
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
set OpenCV_DIR=C:\OpenCV\opencv-3.4.7\build
set BUILD_DIR=build_win_ocv347
set PATH=%PATH%;%OpenCV_DIR%\x64\vc15\bin
set PYTHONPATH=%PYTHONPATH%;%OpenCV_DIR%\python\cv2\python-3.7
if exist %BUILD_DIR% (
echo Removing existing folder
RMDIR /Q/S %BUILD_DIR%
)
mkdir %BUILD_DIR%
cd %BUILD_DIR%
cmake -DOpenCV_DIR=%OpenCV_DIR% -G "Visual Studio 16 2019" ..
:: 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.
devenv bgslibrary.sln
cd .. |
I just upgraded Thank you |
Unfortunately, using the version pybgs-3.3.0.post2 does not work. |
I am getting unsuccessful installation running pip install pybgs on Windows in a conda environemt. this is the output I get. I am quite new to this, so thanks for any suggestion.
(SIFT3) C:\Users\Matteo>pip install opencv
ERROR: Could not find a version that satisfies the requirement opencv (from versions: none)
ERROR: No matching distribution found for opencv
(SIFT3) C:\Users\Matteo>pip install pybgs
Collecting pybgs
Using cached pybgs-3.3.0.post0.tar.gz (622 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: pybgs
Building wheel for pybgs (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [97 lines of output]
running bdist_wheel
running build
running build_ext
cmake -HC:\Users\Matteo\AppData\Local\Temp\pip-install-aw41ui74\pybgs_75fb11b753b9499b8eeef5455fea6797 -Bbuild\temp.win-amd64-cpython-312\Release -DPYTHON_EXECUTABLE=D:\miniconda3\envs\SIFT3\python.exe -DBGS_CORE_STATIC=ON -DBGS_PYTHON_SUPPORT=ON -DBGS_PYTHON_ONLY=ON -DBGS_PYTHON_VERSION=3.12
-- Building for: Visual Studio 16 2019
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pybgs
Running setup.py clean for pybgs
Failed to build pybgs
ERROR: Could not build wheels for pybgs, which is required to install pyproject.toml-based projects
The text was updated successfully, but these errors were encountered: