Is bluepy live? - python

I tried to install bluepy under Python 3.9 on my Mac. The install failed with a very long error message suggesting that some include files could not be found. The project has quite a few open issues; does anybody know if it is alive?
The gory details:
% pip3 install bluepy
Collecting bluepy
Using cached bluepy-1.3.0.tar.gz (217 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: bluepy
Building wheel for bluepy (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/dist.py:697: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
running bdist_wheel
running build
running build_py
Working dir is /private/var/folders/zx/bbkpbk9x48v95vgbwdd7qp_r0000gr/T/pip-install-y241v84d/bluepy_6884a18d66a84c7fbf520b43aaa87575
execute make -C ./bluepy clean
execute make -C bluepy -j1
Failed to compile bluepy-helper. Exiting install.
Command was 'make -C bluepy -j1' in /private/var/folders/zx/bbkpbk9x48v95vgbwdd7qp_r0000gr/T/pip-install-y241v84d/bluepy_6884a18d66a84c7fbf520b43aaa87575
Return code was 2
Output was:
b"tar xzf bluez-src.tgz\ntouch ./bluez-5.47/lib/bluetooth.c ./bluez-5.47/lib/hci.c ./bluez-5.47/lib/sdp.c ./bluez-5.47/lib/uuid.c ./bluez-5.47/attrib/att.c ./bluez-5.47/attrib/gatt.c ./bluez-5.47/attrib/gattrib.c ./bluez-5.47/attrib/utils.c ./bluez-5.47/btio/btio.c ./bluez-5.47/src/log.c ./bluez-5.47/src/shared/mgmt.c ./bluez-5.47/src/shared/crypto.c ./bluez-5.47/src/shared/att.c ./bluez-5.47/src/shared/queue.c ./bluez-5.47/src/shared/util.c ./bluez-5.47/src/shared/io-glib.c ./bluez-5.47/src/shared/timeout-glib.c\ncc -L. -g -Wall -Os -DHAVE_CONFIG_H -I./bluez-5.47/attrib -I./bluez-5.47 -I./bluez-5.47/lib -I./bluez-5.47/src -I./bluez-5.47/gdbus -I./bluez-5.47/btio -I./bluez-5.47/sys -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -o bluepy-helper bluepy-helper.c ./bluez-5.47/lib/bluetooth.c ./bluez-5.47/lib/hci.c ./bluez-5.47/lib/sdp.c ./bluez-5.47/lib/uuid.c ./bluez-5.47/attrib/att.c ./bluez-5.47/attrib/gatt.c ./bluez-5.47/attrib/gattrib.c ./bluez-5.47/attrib/utils.c ./bluez-5.47/btio/btio.c ./bluez-5.47/src/log.c ./bluez-5.47/src/shared/mgmt.c ./bluez-5.47/src/shared/crypto.c ./bluez-5.47/src/shared/att.c ./bluez-5.47/src/shared/queue.c ./bluez-5.47/src/shared/util.c ./bluez-5.47/src/shared/io-glib.c ./bluez-5.47/src/shared/timeout-glib.c -L/opt/local/lib -lglib-2.0 -lintl\nIn file included from bluepy-helper.c:36:\n./bluez-5.47/lib/bluetooth.h:36:10: fatal error: 'endian.h' file not found\n#include <endian.h>\n
^~~~~~~~~~\n1 error generated.\nIn file included from ./bluez-5.47/lib/bluetooth.c:38:\n./bluez-5.47/lib/bluetooth.h:36:10:
fatal error: 'endian.h' file not found\n#include <endian.h>\n
^~~~~~~~~~\n1 error generated.\nIn file included from
./bluez-5.47/lib/hci.c:44:\n./bluez-5.47/lib/bluetooth.h:36:10: fatal
error: 'endian.h' file not found\n#include <endian.h>\n
^~~~~~~~~~\n1 error generated.\nIn file included from
./bluez-5.47/lib/sdp.c:45:\n./bluez-5.47/lib/bluetooth.h:36:10: fatal
error: 'endian.h' file not found\n#include <endian.h>\n
^~~~~~~~~~\n1 error generated.\nIn file included from
./bluez-5.47/lib/uuid.c:33:\n./bluez-5.47/lib/bluetooth.h:36:10: fatal
error: 'endian.h' file not found\n#include <endian.h>\n
^~~~~~~~~~\n1 error generated.\nIn file included from
./bluez-5.47/attrib/att.c:35:\n./bluez-5.47/lib/bluetooth.h:36:10:
fatal error: 'endian.h' file not found\n#include <endian.h>\n
^~~~~~~~~~\n1 error generated.\nIn file included from
./bluez-5.47/attrib/gatt.c:34:\nIn file included from
./bluez-5.47/lib/sdp.h:35:\n./bluez-5.47/sys/bluetooth/bluetooth.h:36:10:
fatal error: 'endian.h' file not found\n#include <endian.h>\n
^~~~~~~~~~\n1 error generated.\nIn file included from
./bluez-5.47/attrib/gattrib.c:36:\n./bluez-5.47/lib/bluetooth.h:36:10:
fatal error: 'endian.h' file not found\n#include <endian.h>\n
^~~~~~~~~~\n1 error generated.\nIn file included from
./bluez-5.47/attrib/utils.c:32:\n./bluez-5.47/lib/bluetooth.h:36:10:
fatal error: 'endian.h' file not found\n#include <endian.h>\n
^~~~~~~~~~\n1 error generated.\nIn file included from
./bluez-5.47/btio/btio.c:39:\n./bluez-5.47/lib/bluetooth.h:36:10:
fatal error: 'endian.h' file not found\n#include <endian.h>\n
^~~~~~~~~~\n1 error generated.\nIn file included from
./bluez-5.47/src/log.c:40:\n./bluez-5.47/lib/bluetooth.h:36:10: fatal
error: 'endian.h' file not found\n#include <endian.h>\n
^~~~~~~~~~\n1 error generated.\nIn file included from
./bluez-5.47/src/shared/mgmt.c:33:\n./bluez-5.47/lib/bluetooth.h:36:10:
fatal error: 'endian.h' file not found\n#include <endian.h>\n
^~~~~~~~~~\n1 error generated.\nIn file included from
./bluez-5.47/src/shared/crypto.c:33:\n./bluez-5.47/src/shared/util.h:27:10:
fatal error: 'byteswap.h' file not found\n#include <byteswap.h>\n
^~~~~~~~~~~~\n1 error generated.\nIn file included from
./bluez-5.47/src/shared/att.c:34:\n./bluez-5.47/src/shared/util.h:27:10:
fatal error: 'byteswap.h' file not found\n#include <byteswap.h>\n
^~~~~~~~~~~~\n1 error generated.\nIn file included from
./bluez-5.47/src/shared/queue.c:28:\n./bluez-5.47/src/shared/util.h:27:10:
fatal error: 'byteswap.h' file not found\n#include <byteswap.h>\n
^~~~~~~~~~~~\n1 error generated.\nIn file included from
./bluez-5.47/src/shared/util.c:38:\n./bluez-5.47/src/shared/util.h:27:10:
fatal error: 'byteswap.h' file not found\n#include <byteswap.h>\n
^~~~~~~~~~~~\n1 error generated.\nmake: *** [bluepy-helper] Error 1\n"
[end of output]

Related

Pip install fail on Mac "Getting requirements to build wheel ... error"

When I try to use pip to install packages on Mac I run into this error:
"Getting requirements to build wheel ... error
error: subprocess-exited-with-error
Getting requirements to build wheel did not run successfully."
It only happens when I try to install certain packages (scipy and sklearn). Other packages install fine (numpy and pandas).
I am on a Mac running Python: 3.10.7 and pip 22.2.2. I am relatively new to all of this so please let me know if you need more information and I appreciate any help.
FULL ERROR:
cobykirkland#Cobys-MacBook-Pro ~ % pip install scipy
Collecting scipy
Using cached scipy-1.9.1.tar.gz (42.0 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [61 lines of output]
The Meson build system
Version: 0.62.2
Source dir: /private/var/folders/nh/bw_22w4j4pg23hczs34hg5jc0000gn/T/pip-install-keuagdr1/scipy_af79793bfc2c43319072f465a4dd6b51
Build dir: /private/var/folders/nh/bw_22w4j4pg23hczs34hg5jc0000gn/T/pip-install-keuagdr1/scipy_af79793bfc2c43319072f465a4dd6b51/.mesonpy-j1n79wk8/build
Build type: native build
Project name: SciPy
Project version: 1.9.1
C compiler for the host machine: cc (clang 12.0.5 "Apple clang version 12.0.5 (clang-1205.0.22.11)")
C linker for the host machine: cc ld64 650.9
C++ compiler for the host machine: c++ (clang 12.0.5 "Apple clang version 12.0.5 (clang-1205.0.22.11)")
C++ linker for the host machine: c++ ld64 650.9
Host machine cpu family: aarch64
Host machine cpu: arm64
Compiler for C supports arguments -Wno-unused-but-set-variable: NO
Library m found: YES
../../meson.build:41:0: ERROR: Unknown compiler(s): [['gfortran'], ['flang'], ['nvfortran'], ['pgfortran'], ['ifort'], ['g95']]
The following exception(s) were encountered:
Running "gfortran --version" gave "[Errno 2] No such file or directory: 'gfortran'"
Running "gfortran -V" gave "[Errno 2] No such file or directory: 'gfortran'"
Running "flang --version" gave "[Errno 2] No such file or directory: 'flang'"
Running "flang -V" gave "[Errno 2] No such file or directory: 'flang'"
Running "nvfortran --version" gave "[Errno 2] No such file or directory: 'nvfortran'"
Running "nvfortran -V" gave "[Errno 2] No such file or directory: 'nvfortran'"
Running "pgfortran --version" gave "[Errno 2] No such file or directory: 'pgfortran'"
Running "pgfortran -V" gave "[Errno 2] No such file or directory: 'pgfortran'"
Running "ifort --version" gave "[Errno 2] No such file or directory: 'ifort'"
Running "ifort -V" gave "[Errno 2] No such file or directory: 'ifort'"
Running "g95 --version" gave "[Errno 2] No such file or directory: 'g95'"
Running "g95 -V" gave "[Errno 2] No such file or directory: 'g95'"
A full log can be found at /private/var/folders/nh/bw_22w4j4pg23hczs34hg5jc0000gn/T/pip-install-keuagdr1/scipy_af79793bfc2c43319072f465a4dd6b51/.mesonpy-j1n79wk8/build/meson-logs/meson-log.txt
+ meson setup --native-file=/private/var/folders/nh/bw_22w4j4pg23hczs34hg5jc0000gn/T/pip-install-keuagdr1/scipy_af79793bfc2c43319072f465a4dd6b51/.mesonpy-native-file.ini -Ddebug=false -Doptimization=2 --prefix=/Library/Frameworks/Python.framework/Versions/3.10 /private/var/folders/nh/bw_22w4j4pg23hczs34hg5jc0000gn/T/pip-install-keuagdr1/scipy_af79793bfc2c43319072f465a4dd6b51 /private/var/folders/nh/bw_22w4j4pg23hczs34hg5jc0000gn/T/pip-install-keuagdr1/scipy_af79793bfc2c43319072f465a4dd6b51/.mesonpy-j1n79wk8/build
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
return hook(config_settings)
File "/private/var/folders/nh/bw_22w4j4pg23hczs34hg5jc0000gn/T/pip-build-env-zc95ob3s/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 969, in get_requires_for_build_wheel
with _project(config_settings) as project:
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 135, in __enter__
return next(self.gen)
File "/private/var/folders/nh/bw_22w4j4pg23hczs34hg5jc0000gn/T/pip-build-env-zc95ob3s/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 948, in _project
with Project.with_temp_working_dir(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 135, in __enter__
return next(self.gen)
File "/private/var/folders/nh/bw_22w4j4pg23hczs34hg5jc0000gn/T/pip-build-env-zc95ob3s/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 777, in with_temp_working_dir
yield cls(source_dir, tmpdir, build_dir)
File "/private/var/folders/nh/bw_22w4j4pg23hczs34hg5jc0000gn/T/pip-build-env-zc95ob3s/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 682, in __init__
self._configure(reconfigure=bool(build_dir) and not native_file_mismatch)
File "/private/var/folders/nh/bw_22w4j4pg23hczs34hg5jc0000gn/T/pip-build-env-zc95ob3s/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 713, in _configure
self._meson(
File "/private/var/folders/nh/bw_22w4j4pg23hczs34hg5jc0000gn/T/pip-build-env-zc95ob3s/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 696, in _meson
return self._proc('meson', *args)
File "/private/var/folders/nh/bw_22w4j4pg23hczs34hg5jc0000gn/T/pip-build-env-zc95ob3s/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 691, in _proc
subprocess.check_call(list(args))
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['meson', 'setup', '--native-file=/private/var/folders/nh/bw_22w4j4pg23hczs34hg5jc0000gn/T/pip-install-keuagdr1/scipy_af79793bfc2c43319072f465a4dd6b51/.mesonpy-native-file.ini', '-Ddebug=false', '-Doptimization=2', '--prefix=/Library/Frameworks/Python.framework/Versions/3.10', '/private/var/folders/nh/bw_22w4j4pg23hczs34hg5jc0000gn/T/pip-install-keuagdr1/scipy_af79793bfc2c43319072f465a4dd6b51', '/private/var/folders/nh/bw_22w4j4pg23hczs34hg5jc0000gn/T/pip-install-keuagdr1/scipy_af79793bfc2c43319072f465a4dd6b51/.mesonpy-j1n79wk8/build']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
scipy provides pip-installable wheels for scipy-1.9.2-cp310-cp310-macosx_12_0_arm64.whl. For various reasons arm64 wheels are only available for Monterey, not Big Sur. I'm guessing that your OS is currently Big Sur, otherwise the correct wheel should've been installed. You have a few options:
Upgrade to Monterey.
Use conda to install scipy
Try using rosetta to run an x86_64 Python, there are wheels for that architecture that will run on Monterey - this will be more complicated.

Installing PyAudio on windows: ModuleNotFoundError: No module named 'pyaudio'

I am using bash terminal in vscode. When I try to run my code:
#!/usr/bin/env python3
from pyaudio import speech_recognition as sr
r = sr.Recognizer()
mic = sr.Microphone()
with mic as source:
audio = r.listen(source)
as seen in https://realpython.com/python-speech-recognition/#working-with-microphones I get this error:
python3 live_audio.py
Traceback (most recent call last):
File "live_audio.py", line 3, in <module>
from pyaudio import speech_recognition as sr
ModuleNotFoundError: No module named 'pyaudio'
I have pyaudio installed on my machine as in the cmd when I run "pip3 install pyaudio" it says:
Requirement already satisfied: pyaudio in c:\users\user1\appdata\local\programs\python\python39-32\lib\site-packages (0.2.11)"
However in the bash terminal when I run "pip3 install pyaudio" I get this error message:
pip3 install pyaudio
Defaulting to user installation because normal site-packages is not writeable
Collecting pyaudio
Using cached PyAudio-0.2.12.tar.gz (42 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pyaudio (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-38
copying src/pyaudio.py -> build/lib.linux-x86_64-cpython-38
running build_ext
building '_portaudio' extension
creating build/temp.linux-x86_64-cpython-38
creating build/temp.linux-x86_64-cpython-38/src
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv
-O2 -fPIC -I/usr/local/include -I/usr/include -I/usr/include/python3.8 -c src/_portaudiomodule.c -o build/temp.linux-x86_64-cpython-38/src/_portaudiomodule.o
src/_portaudiomodule.c:31:10: fatal error: portaudio.h: No such file or directory
31 | #include "portaudio.h"
| ^~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pyaudio
Failed to build pyaudio
ERROR: Could not build wheels for pyaudio, which is required to install pyproject.toml-based projects
--- Logging error ---
Traceback (most recent call last):
File "/home/user1/.local/lib/python3.8/site-packages/pip/_internal/utils/logging.py", line 177, in emit
self.console.print(renderable, overflow="ignore", crop=False, style=style)
File "/home/user1/.local/lib/python3.8/site-packages/pip/_vendor/rich/console.py", line 1673, in print
extend(render(renderable, render_options))
File "/home/user1/.local/lib/python3.8/site-packages/pip/_vendor/rich/console.py", line 1305, in render
for render_output in iter_render:
File "/home/user1/.local/lib/python3.8/site-packages/pip/_internal/utils/logging.py", line 134, in __rich_console__
for line in lines:
File "/home/user1/.local/lib/python3.8/site-packages/pip/_vendor/rich/segment.py", line 249, in split_lines
for segment in segments:
File "/home/user1/.local/lib/python3.8/site-packages/pip/_vendor/rich/console.py", line 1283, in render
renderable = rich_cast(renderable)
File "/home/user1/.local/lib/python3.8/site-packages/pip/_vendor/rich/protocol.py", line 36, in rich_cast
renderable = cast_method()
File "/home/user1/.local/lib/python3.8/site-packages/pip/_internal/self_outdated_check.py", line 130, in __rich__
pip_cmd = get_best_invocation_for_this_pip()
File "/home/user1/.local/lib/python3.8/site-packages/pip/_internal/utils/entrypoints.py", line 58, in get_best_invocation_for_this_pip
if found_executable and os.path.samefile(
File "/usr/lib/python3.8/genericpath.py", line 101, in samefile
s2 = os.stat(f2)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/pip'
Call stack:
File "/home/user1/.local/bin/pip3", line 8, in <module>
sys.exit(main())
File "/home/user1/.local/lib/python3.8/site-packages/pip/_internal/cli/main.py", l.py", line 70, in main
return command.main(cmd_args)
File "/home/user1/.local/lib/python3.8/site-packages/pip/_internal/cli/base_comman_command.py", line 101, in main
return self._main(args)
File "/home/user1/.local/lib/python3.8/site-packages/pip/_internal/cli/base_comman_command.py", line 223, in _main
self.handle_pip_version_check(options)
File "/home/user1/.local/lib/python3.8/site-packages/pip/_internal/cli/req_commandcommand.py", line 190, in handle_pip_version_check
pip_self_version_check(session, options)
File "/home/user1/.local/lib/python3.8/site-packages/pip/_internal/self_outdated_cdated_check.py", line 236, in pip_self_version_check
logger.warning("[present-rich] %s", upgrade_prompt)
File "/usr/lib/python3.8/logging/__init__.py", line 1446, in warning
self._log(WARNING, msg, args, **kwargs)
File "/usr/lib/python3.8/logging/__init__.py", line 1577, in _log
self.handle(record)
File "/usr/lib/python3.8/logging/__init__.py", line 1587, in handle
self.callHandlers(record)
File "/usr/lib/python3.8/logging/__init__.py", line 1649, in callHandlers
hdlr.handle(record)
File "/usr/lib/python3.8/logging/__init__.py", line 950, in handle
self.emit(record)
File "/home/user1/.local/lib/python3.8/site-packages/pip/_internal/utils/logging.pgging.py", line 179, in emit
self.handleError(record)
Message: '[present-rich] %s'
Arguments: (UpgradePrompt(old='22.2.2', new='22.3'),)
I have also installed the .whl for my machine using "pip3 install PyAudio-0.2.11-cp38-cp38-win_amd64.whl" but I get this error (in bash terminal):
Defaulting to user installation because normal site-packages is not writeable
ERROR: PyAudio-0.2.11-cp38-cp38-win_amd64.whl is not a supported wheel on this
platform.
Does anyone have any idea what I'm doing wrong?
Thank you

Could not find module (or one of its dependencies). Try using the full path with constructor syntax?

I am trying to install greppo and this error is popping up.
Here is detail:
Collecting Shapely==1.7.1
Using cached Shapely-1.7.1.tar.gz (383 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\waqas\AppData\Local\Temp\pip-install-7s68x426\shapely_7bc3527fa38249478d749a0dbc
729913\setup.py", line 85, in <module>
from shapely._buildcfg import geos_version_string, geos_version, \
File "C:\Users\waqas\AppData\Local\Temp\pip-install-7s68x426\shapely_7bc3527fa38249478d749a0dbc
729913\shapely\_buildcfg.py", line 205, in <module>
lgeos = CDLL("geos_c.dll")
File "C:\Users\waqas\AppData\Local\Programs\Python\Python310\lib\ctypes\__init__.py", line 374,
in __init__
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'geos_c.dll' (or one of its dependencies). Try using the
full path with constructor syntax.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Compiling with FFMPEG using g++

Im trying to compile a github code that requires opencv and FFMPEG. The code is:
https://github.com/prouast/heartbeat
This is what i have
g++ -std=c++11 -LC:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\bin -LC:\Anaconda\pkgs\opencv3-3.1.0-py35_0\Library\lib -LC:\MinGW\var\lib\mingw-get\data -IC:\Anaconda\envs\mywindowscv\Library\include -lopencv_core310 -lopencv_highgui310 -lopencv_imgcodecs310 -lopencv_imgproc310 -lopencv_objdetect310 -lopencv_video310 -lopencv_videoio310 -lavcodec-58 -lavformat-58 -lavutil-56 -lswscale-5 -lmingw32-libarchive -lSDLMain -mwindows Heartbeat.cpp FFmpegDecoder.cpp FFmpegEncoder.cpp opencv.cpp RPPG.cpp Baseline.cpp -o Heartbeat
I get the following error:
In file included from Heartbeat.cpp:16:0:
FFmpegDecoder.hpp:16:36: fatal error: libavcodec/avcodec.h: No such file or directory
^
compilation terminated.
In file included from FFmpegDecoder.cpp:9:0:
FFmpegDecoder.hpp:16:36: fatal error: libavcodec/avcodec.h: No such file or directory
^
compilation terminated.
In file included from FFmpegEncoder.cpp:9:0:
FFmpegEncoder.hpp:17:32: fatal error: libavcodec/avcodec.h: No such file or directory
what to do?

Python scipy.weave not working anymore

I wrote a script a few months ago using python. In this script I use weave. This script used to work, but I retried running my program today after a few month and it doesn't work anymore. I get this error:
USAGE: facedetect.py [--cascade <cascade_fn>] [--nested-cascade <cascade_fn>] [<video_source>]
Found executable C:\strawberry\c\bin\g++.exe
c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\python2.7\libs/libpython27.a when searching for -lpython27
c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\python2.7\libs/python27.lib when searching for -lpython27
c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\python2.7\libs\libpython27.a when searching for -lpython27
c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\python2.7\libs/libpython27.a when searching for -lpython27
c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\python2.7\libs/python27.lib when searching for -lpython27
c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\python2.7\libs\python27.lib when searching for -lpython27
c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython27
collect2: ld returned 1 exit status
Traceback (most recent call last):
File "C:\Users\Olivier.Janssens\Documents\onlinelearning\onlinelearning\facedetect.py", line 87, in <module>
processFrame(roi,gabor)
File "C:\Users\Olivier.Janssens\Documents\onlinelearning\onlinelearning\facedetect.py", line 51, in processFrame
im = Image.fromarray(gabor.rlbp_fast_blitz(superimposed[(i*stepHeight):((i+1)*stepHeight),(j*stepWidth):((j+1)*stepWidth)]))
File "C:\Users\Olivier.Janssens\Documents\onlinelearning\onlinelearning\gaborModule.py", line 80, in rlbp_fast_blitz
weave.blitz(expr, arg_dict, check_size=0)
File "C:\python2.7\lib\site-packages\scipy\weave\blitz_tools.py", line 62, in blitz
**kw)
File "C:\python2.7\lib\site-packages\scipy\weave\inline_tools.py", line 482, in compile_function
verbose=verbose, **kw)
File "C:\python2.7\lib\site-packages\scipy\weave\ext_tools.py", line 367, in compile
verbose = verbose, **kw)
File "C:\python2.7\lib\site-packages\scipy\weave\build_tools.py", line 272, in build_extension
setup(name = module_name, ext_modules = [ext],verbose=verb)
File "C:\python2.7\lib\site-packages\numpy\distutils\core.py", line 186, in setup
return old_setup(**new_attr)
File "C:\python2.7\lib\distutils\core.py", line 169, in setup
raise SystemExit, "error: " + str(msg)
distutils.errors.CompileError: error: Command "g++ -shared c:\users\olivie~1.jan\appdata\local\temp\Olivier.Janssens\python27_intermediate\compiler_5b1f9617507e215394a4b4c2536b23c6\Release\users\olivie~1.jan\appdata\local\temp\olivier.janssens\python27_compiled\sc_24e057e16c3730b6904be220694a322419.o c:\users\olivie~1.jan\appdata\local\temp\Olivier.Janssens\python27_intermediate\compiler_5b1f9617507e215394a4b4c2536b23c6\Release\python2.7\lib\site-packages\scipy\weave\scxx\weave_imp.o -LC:\python2.7\libs -LC:\python2.7\PCbuild -lpython27 -lmsvcr90 -o c:\users\olivie~1.jan\appdata\local\temp\Olivier.Janssens\python27_compiled\sc_24e057e16c3730b6904be220694a322419.pyd" failed with exit status 1
The error states: cannot find -lpython27
this is how the folder looks like (which the program is using)
Some extra information: I have a 64 bit pc, running windows 7, python is 32 bit.
Recently my Path variable was cleared, though I've added the python path to it, maybe I need to add something here too ?
It is finding python27.lib (in the python folder) but is skipping it as incompatible most likely as it was built with Visual C++ and you are using gcc - You probably had a gcc build of python on your path - if so you need to add it back or set the linker path to include . i.e. the current directory.

Categories