I am trying to install ssh-python and ssh2-python dependencies for my project but I am getting this error-
(myenv) shlokabhalgat#Shlokas-MacBook-Pro unskript % /usr/bin/env python3 -m pip install ssh-python
Defaulting to user installation because normal site-packages is not writeable
Collecting ssh-python
Using cached ssh-python-0.10.0.tar.gz (1.4 MB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: ssh-python
Building wheel for ssh-python (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [105 lines of output]
-- The C compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Found ZLIB: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libz.tbd (found version "1.2.11")
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR)
-- Could NOT find GCrypt, try to set the path to GCrypt root folder in the system variable GCRYPT_ROOT_DIR (missing: GCRYPT_INCLUDE_DIR GCRYPT_LIBRARIES)
CMake Warning (dev) at /opt/homebrew/Cellar/cmake/3.24.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to `find_package_handle_standard_args` (MBedTLS)
does not match the name of the calling package (MbedTLS). This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
cmake/Modules/FindMbedTLS.cmake:96 (find_package_handle_standard_args)
CMakeLists.txt:71 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Could NOT find mbedTLS, try to set the path to mbedLS root folder in
the system variable MBEDTLS_ROOT_DIR (missing: MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARIES)
CMake Error at CMakeLists.txt:73 (message):
Could not find OpenSSL, GCrypt or mbedTLS
-- Configuring incomplete, errors occurred!
See also "/private/var/folders/3q/0yvfdsl56yq4g8q_dvy7ccp40000gn/T/pip-install-9rfyjr5q/ssh-python_f59ee5c3368d4cde97ede17de8f04861/src/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/3q/0yvfdsl56yq4g8q_dvy7ccp40000gn/T/pip-install-9rfyjr5q/ssh-python_f59ee5c3368d4cde97ede17de8f04861/setup.py", line 38, in <module>
build_ssh()
File "/private/var/folders/3q/0yvfdsl56yq4g8q_dvy7ccp40000gn/T/pip-install-9rfyjr5q/ssh-python_f59ee5c3368d4cde97ede17de8f04861/_setup_libssh.py", line 44, in build_ssh
check_call('cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../local -DWITH_GSS_API=ON ../libssh',
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../local -DWITH_GSS_API=ON ../libssh' 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: Failed building wheel for ssh-python
Running setup.py clean for ssh-python
Failed to build ssh-python
Installing collected packages: ssh-python
Running setup.py install for ssh-python ... error
error: subprocess-exited-with-error
× Running setup.py install for ssh-python did not run successfully.
│ exit code: 1
╰─> [30 lines of output]
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR)
-- Could NOT find GCrypt, try to set the path to GCrypt root folder in the system variable GCRYPT_ROOT_DIR (missing: GCRYPT_INCLUDE_DIR GCRYPT_LIBRARIES)
CMake Warning (dev) at /opt/homebrew/Cellar/cmake/3.24.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to `find_package_handle_standard_args` (MBedTLS)
does not match the name of the calling package (MbedTLS). This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
cmake/Modules/FindMbedTLS.cmake:96 (find_package_handle_standard_args)
CMakeLists.txt:71 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Could NOT find mbedTLS, try to set the path to mbedLS root folder in
the system variable MBEDTLS_ROOT_DIR (missing: MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARIES)
CMake Error at CMakeLists.txt:73 (message):
Could not find OpenSSL, GCrypt or mbedTLS
-- Configuring incomplete, errors occurred!
See also "/private/var/folders/3q/0yvfdsl56yq4g8q_dvy7ccp40000gn/T/pip-install-9rfyjr5q/ssh-python_f59ee5c3368d4cde97ede17de8f04861/src/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/3q/0yvfdsl56yq4g8q_dvy7ccp40000gn/T/pip-install-9rfyjr5q/ssh-python_f59ee5c3368d4cde97ede17de8f04861/setup.py", line 38, in <module>
build_ssh()
File "/private/var/folders/3q/0yvfdsl56yq4g8q_dvy7ccp40000gn/T/pip-install-9rfyjr5q/ssh-python_f59ee5c3368d4cde97ede17de8f04861/_setup_libssh.py", line 44, in build_ssh
check_call('cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../local -DWITH_GSS_API=ON ../libssh',
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../local -DWITH_GSS_API=ON ../libssh' 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: legacy-install-failure
× Encountered error while trying to install package.
╰─> ssh-python
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I have installed cmake.
Command 1- brew install cmake
Command 2- /usr/bin/env python3 -m pip install ssh-python
I was getting this error for matplotlib, pyodbc, and pandas but it was resolved after installing cmake. This is not working for ssh-python and ssh2-python. However, the documentation says there are no dependencies.
Related
>pip install AutoItLibrary
Collecting AutoItLibrary
Using cached AutoItLibrary-1.1.post1.zip (482 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\samrins\AppData\Local\Temp\pip-install-zeihf1a8\autoitlibrary_e6935c1fdc7a414a8f3694d5f9101d89\setup.py", line 57
print "Don't think we need to unregister the old one..."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
[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.
WARNING: There was an error checking the latest version of pip.
You're not installing the correct library. AutoItLibrary is an old one, not updated since 2010 following this page https://code.google.com/archive/p/robotframework-autoitlibrary/
The one you should used is the library robotframework-autoitlibrary as referenced on https://robotframework.org/#resources
i'm trying to install robotframework-ride pkg on a Virtual Machine (oracle virtual box) of my PC (win10).
I have just installed the following software on VM.
I'm just preparing development environemnt for testing automation with robotframework but there is a problem installing RIDE IDE.
OS: win10
Python version: 3.10.7
packages installed:
numpy==1.23.3
Pillow==9.2.0
Pygments==2.13.0
Pypubsub==4.0.3
pywin32==304
robotframework==5.0.1
six==1.16.0
there conversion problem between '-' and '_', canyou help me please?
log trace:
E:\Python3>pip install robotframework-ride
Collecting robotframework-ride
Using cached robotframework_ride-1.7.4.2-py3-none-any.whl
Collecting wxPython<=4.0.7.post2
Using cached wxPython-4.0.7.post2.tar.gz (68.9 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: Pygments in e:\python3\lib\site-packages (from robotframework-ride) (2.13.0)
Requirement already satisfied: PyPubSub in e:\python3\lib\site-packages (from robotframework-ride) (4.0.3)
Requirement already satisfied: Pywin32 in e:\python3\lib\site-packages (from robotframework-ride) (304)
Requirement already satisfied: pillow in e:\python3\lib\site-packages (from wxPython<=4.0.7.post2->robotframework-ride) (9.2.0)
Requirement already satisfied: six in e:\python3\lib\site-packages (from wxPython<=4.0.7.post2->robotframework-ride) (1.16.0)
Requirement already satisfied: numpy in e:\python3\lib\site-packages (from wxPython<=4.0.7.post2->robotframework-ride) (1.23.3)
Building wheels for collected packages: wxPython
Building wheel for wxPython (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [51 lines of output]
E:\Python3\lib\site-packages\setuptools\dist.py:771: UserWarning: Usage of dash-separated 'license-file' will not be supported in future versions. Please use the underscore name 'license_file' instead
warnings.warn(
E:\Python3\lib\site-packages\setuptools\config\setupcfg.py:463: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
E:\Python3\lib\site-packages\setuptools\dist.py:317: DistDeprecationWarning: use_2to3 is ignored.
warnings.warn(f"{attr} is ignored.", DistDeprecationWarning)
running bdist_wheel
running build
Will build using: "E:\Python3\python.exe"
3.10.7 (tags/v3.10.7:6cc6b13, Sep 5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)]
Python's architecture is 64bit
cfg.VERSION: 4.0.7.post2
Running command: build
Running command: build_wx
Command '"E:\Python3\python.exe" -c "import distutils.msvc9compiler as msvc; mc = msvc.MSVCCompiler(); mc.initialize(); print(mc.cc)"' failed with exit code 1.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "E:\Python3\lib\site-packages\setuptools\_distutils\msvc9compiler.py", line 393, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "E:\Python3\lib\site-packages\setuptools\msvc.py", line 140, in msvc9_query_vcvarsall
return EnvironmentInfo(arch, ver).return_env()
File "E:\Python3\lib\site-packages\setuptools\msvc.py", line 1740, in return_env
[self.VCIncludes,
File "E:\Python3\lib\site-packages\setuptools\msvc.py", line 1282, in VCIncludes
return [join(self.si.VCInstallDir, 'Include'),
File "E:\Python3\lib\site-packages\setuptools\msvc.py", line 840, in VCInstallDir
raise distutils.errors.DistutilsPlatformError(msg)
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.3 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
Finished command: build_wx (0.448s)
Finished command: build (0.448s)
WARNING: Building this way assumes that all generated files have been
generated already. If that is not the case then use build.py directly
to generate the source and perform the build stage. You can use
--skip-build with the bdist_* or install commands to avoid this
message and the wxWidgets and Phoenix build steps in the future.
"E:\Python3\python.exe" -u build.py build
Command '"E:\Python3\python.exe" -u build.py build' 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 wxPython
Running setup.py clean for wxPython
Failed to build wxPython
Installing collected packages: wxPython, robotframework-ride
Attempting uninstall: wxPython
Found existing installation: wxPython 4.2.0
Uninstalling wxPython-4.2.0:
Successfully uninstalled wxPython-4.2.0
Running setup.py install for wxPython ... error
error: subprocess-exited-with-error
× Running setup.py install for wxPython did not run successfully.
│ exit code: 1
╰─> [53 lines of output]
E:\Python3\lib\site-packages\setuptools\dist.py:771: UserWarning: Usage of dash-separated 'license-file' will not be supported in future versions. Please use the underscore name 'license_file' instead
warnings.warn(
E:\Python3\lib\site-packages\setuptools\config\setupcfg.py:463: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
E:\Python3\lib\site-packages\setuptools\dist.py:317: DistDeprecationWarning: use_2to3 is ignored.
warnings.warn(f"{attr} is ignored.", DistDeprecationWarning)
running install
E:\Python3\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
Will build using: "E:\Python3\python.exe"
3.10.7 (tags/v3.10.7:6cc6b13, Sep 5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)]
Python's architecture is 64bit
cfg.VERSION: 4.0.7.post2
Running command: build
Running command: build_wx
Command '"E:\Python3\python.exe" -c "import distutils.msvc9compiler as msvc; mc = msvc.MSVCCompiler(); mc.initialize(); print(mc.cc)"' failed with exit code 1.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "E:\Python3\lib\site-packages\setuptools\_distutils\msvc9compiler.py", line 393, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "E:\Python3\lib\site-packages\setuptools\msvc.py", line 140, in msvc9_query_vcvarsall
return EnvironmentInfo(arch, ver).return_env()
File "E:\Python3\lib\site-packages\setuptools\msvc.py", line 1740, in return_env
[self.VCIncludes,
File "E:\Python3\lib\site-packages\setuptools\msvc.py", line 1282, in VCIncludes
return [join(self.si.VCInstallDir, 'Include'),
File "E:\Python3\lib\site-packages\setuptools\msvc.py", line 840, in VCInstallDir
raise distutils.errors.DistutilsPlatformError(msg)
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.3 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
Finished command: build_wx (0.392s)
Finished command: build (0.392s)
WARNING: Building this way assumes that all generated files have been
generated already. If that is not the case then use build.py directly
to generate the source and perform the build stage. You can use
--skip-build with the bdist_* or install commands to avoid this
message and the wxWidgets and Phoenix build steps in the future.
"E:\Python3\python.exe" -u build.py build
Command '"E:\Python3\python.exe" -u build.py build' failed with exit code 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
Rolling back uninstall of wxPython
Moving to e:\python3\lib\site-packages\wx\
from E:\Python3\Lib\site-packages\~x
Moving to e:\python3\lib\site-packages\wxpython-4.2.0.dist-info\
from E:\Python3\Lib\site-packages\~xpython-4.2.0.dist-info
Moving to e:\python3\scripts\helpviewer.exe
from C:\Users\Richard\AppData\Local\Temp\pip-uninstall-nyfplg56\helpviewer.exe
Moving to e:\python3\scripts\img2png.exe
from C:\Users\Richard\AppData\Local\Temp\pip-uninstall-nyfplg56\img2png.exe
Moving to e:\python3\scripts\img2py.exe
from C:\Users\Richard\AppData\Local\Temp\pip-uninstall-nyfplg56\img2py.exe
Moving to e:\python3\scripts\img2xpm.exe
from C:\Users\Richard\AppData\Local\Temp\pip-uninstall-nyfplg56\img2xpm.exe
Moving to e:\python3\scripts\pycrust.exe
from C:\Users\Richard\AppData\Local\Temp\pip-uninstall-nyfplg56\pycrust.exe
Moving to e:\python3\scripts\pyshell.exe
from C:\Users\Richard\AppData\Local\Temp\pip-uninstall-nyfplg56\pyshell.exe
Moving to e:\python3\scripts\pyslices.exe
from C:\Users\Richard\AppData\Local\Temp\pip-uninstall-nyfplg56\pyslices.exe
Moving to e:\python3\scripts\pyslicesshell.exe
from C:\Users\Richard\AppData\Local\Temp\pip-uninstall-nyfplg56\pyslicesshell.exe
Moving to e:\python3\scripts\pywxrc.exe
from C:\Users\Richard\AppData\Local\Temp\pip-uninstall-nyfplg56\pywxrc.exe
Moving to e:\python3\scripts\wxdemo.exe
from C:\Users\Richard\AppData\Local\Temp\pip-uninstall-nyfplg56\wxdemo.exe
Moving to e:\python3\scripts\wxdocs.exe
from C:\Users\Richard\AppData\Local\Temp\pip-uninstall-nyfplg56\wxdocs.exe
Moving to e:\python3\scripts\wxget.exe
from C:\Users\Richard\AppData\Local\Temp\pip-uninstall-nyfplg56\wxget.exe
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> wxPython
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
When following the install guide from sparkfun, at the last step when trying to install the package using pip I get these error (with and without sudo).
I am currently running the latest version of raspberry pi os but installed python 3.8 to use with the sparkfun tools.
The sparkfun guide and github pages are included below.
pi#raspberrypi:~/Qwiic_Ublox_Gps_Py/dist $ pip3.8 install sparkfun_ublox_gps-1.1.4.tar.gz
Defaulting to user installation because normal site-packages is not writeable
Processing ./sparkfun_ublox_gps-1.1.4.tar.gz
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-req-build-2qekh4a4/setup.py", line 40, in <module>
with io.open(path.join(here, "DESCRIPTION.rst"), encoding="utf-8") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-req-build-2qekh4a4/DESCRIPTION.rst'
[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.
pi#raspberrypi:~/Qwiic_Ublox_Gps_Py/dist $ sudo pip3.8 install sparkfun_ublox_gps-1.1.4.tar.gz
Processing ./sparkfun_ublox_gps-1.1.4.tar.gz
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-req-build-z8m5x52h/setup.py", line 40, in <module>
with io.open(path.join(here, "DESCRIPTION.rst"), encoding="utf-8") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-req-build-z8m5x52h/DESCRIPTION.rst'
[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.
https://github.com/sparkfun/Qwiic_Ublox_Gps_Py/
https://learn.sparkfun.com/tutorials/sparkfun-gps-rtk-dead-reckoning-zed-f9r-hookup-guide
I'm attempting to install PyQt5 through Pip/Pip3 in macOS Monterey. I've updated all Homebrew applications as well as all Pip installations using the recommended process. Every time I attempt to install the PyQt5 module, I recieve numerous errors. I've tried following some guides, and I've tried following related answers on this site. I've tried installing every version of this software from 5.12.0 to CURRENT. Here's the traceback:
% pip3 install PyQt5
Collecting PyQt5
Using cached PyQt5-5.15.6.tar.gz (3.2 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [24 lines of output]
Querying qmake about your Qt installation...
/opt/homebrew/bin/qmake -query
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 156, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/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.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 160, in prepare_metadata_for_build_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "/private/var/folders/5w/d_mjtj250fd4rrrt2g6pq95c0000gn/T/pip-build-env-rgde383o/overlay/lib/python3.9/site-packages/sipbuild/api.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "/private/var/folders/5w/d_mjtj250fd4rrrt2g6pq95c0000gn/T/pip-build-env-rgde383o/overlay/lib/python3.9/site-packages/sipbuild/abstract_project.py", line 83, in bootstrap
project.setup(pyproject, tool, tool_description)
File "/private/var/folders/5w/d_mjtj250fd4rrrt2g6pq95c0000gn/T/pip-build-env-rgde383o/overlay/lib/python3.9/site-packages/sipbuild/project.py", line 610, in setup
self.update(tool)
File "project.py", line 160, in update
sipbuild.exceptions.UserException
[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.
Any suggestions? System: macOS Monterey 12.2.1, Apple Silicon M1 (aarch64)
I'm trying to install pytorch
python setup.py install
but it fails as it can't locate libavutil/motion_vector.h
[ 66%] Building CXX object caffe2/CMakeFiles/torch.dir/video/video_input_op.cc.o
In file included from /root/pytorch/caffe2/video/video_input_op.h:15:0,
from /root/pytorch/caffe2/video/video_input_op.cc:1:
/root/pytorch/caffe2/video/video_decoder.h:15:37: fatal error: libavutil/motion_vector.h: No such file or directory
#include <libavutil/motion_vector.h>
^
compilation terminated.
[ 66%] Building CXX object caffe2/CMakeFiles/torch.dir/video/video_io.cc.o
make[2]: *** [caffe2/CMakeFiles/torch.dir/video/video_input_op.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /root/pytorch/caffe2/video/video_io.h:6:0,
from /root/pytorch/caffe2/video/video_io.cc:1:
/root/pytorch/caffe2/video/video_decoder.h:15:37: fatal error: libavutil/motion_vector.h: No such file or directory
#include <libavutil/motion_vector.h>
^
compilation terminated.
make[2]: *** [caffe2/CMakeFiles/torch.dir/video/video_io.cc.o] Error 1
make[1]: *** [caffe2/CMakeFiles/torch.dir/all] Error 2
make: *** [all] Error 2
Traceback (most recent call last):
File "setup.py", line 759, in <module>
build_deps()
File "setup.py", line 321, in build_deps
cmake=cmake)
File "/root/pytorch/tools/build_pytorch_libs.py", line 63, in build_caffe2
cmake.build(my_env)
File "/root/pytorch/tools/setup_helpers/cmake.py", line 330, in build
self.run(build_args, my_env)
File "/root/pytorch/tools/setup_helpers/cmake.py", line 143, in run
check_call(command, cwd=self.build_dir, env=env)
File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '12']' returned non-zero exit status 2
What I've tried so far:
installed libavutil-dev
ensured ffmpeg is installed
followed https://github.com/facebookresearch/VMZ/blob/master/tutorials/Installation_guide.md
Any other ideas?
Missing headers of libraries commonly indicate missing development packages. For Debian and Ubuntu the package you are looking for is most likely called libavutil-dev. Try installing this package using you package manager and re-running the pip installation. For Fedora and SUSE the package should end with -devel.
For conda installation, firstly create an env, very important because you've used pip (pip stops conda seeing it's base env).
conda create -n pytorch_env python=3.7
source activate pytorch_env
conda install -c anaconda mkl
Then install pytorch and torch vision
conda install -c pytorch pytorch torchvision
You might want to run these as administrator, for me not needed.
You will need to install Caffe via
conda install -c caffe2 pytorch-nightly
There's a bug for caffe2 installation (not nightly). Corrected below,
conda create -n pytorch_env python=3.6
source activate pytorch_env
conda install -c caffe2 caffe2
Having done this I found opencv and ffmpeg were loaded .. I can only assume they were a dependency of caffe2. Thus in summary yes you can do the whole thing easily via conda once the 3.7 -> 3.6 bug is resolved