Cannot install Scipy using pip on Windows - python

I have a Windows computer and I tried installing SciPy in the Command Prompt using pip. pip install ... worked for other packages that I have installed; however, for scipy, it gave me an error. Any help would be great Below is the error message:
C:\Users\mharvest>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
╰─> [55 lines of output]
The Meson build system
Version: 0.62.2
Source dir: C:\Users\mharvest\AppData\Local\Temp\pip-install-jvemq8sw\scipy_46a2c46b25884e73b044795d4031c57c
Build dir: C:\Users\mharvest\AppData\Local\Temp\pip-install-jvemq8sw\scipy_46a2c46b25884e73b044795d4031c57c\.mesonpy-ouof6i1j\build
Build type: native build
Project name: SciPy
Project version: 1.9.1
WARNING: Failed to activate VS environment: Could not parse vswhere.exe output
..\..\meson.build:1:0: ERROR: Unknown compiler(s): [['icl'], ['cl'], ['cc'], ['gcc'], ['clang'], ['clang-cl'], ['pgcc']]
The following exception(s) were encountered:
Running "icl " gave "[WinError 2] The system cannot find the file specified"
Running "cl /?" gave "[WinError 2] The system cannot find the file specified"
Running "cc --version" gave "[WinError 2] The system cannot find the file specified"
Running "gcc --version" gave "[WinError 2] The system cannot find the file specified"
Running "clang --version" gave "[WinError 2] The system cannot find the file specified"
Running "clang-cl /?" gave "[WinError 2] The system cannot find the file specified"
Running "pgcc --version" gave "[WinError 2] The system cannot find the file specified"
A full log can be found at C:\Users\mharvest\AppData\Local\Temp\pip-install-jvemq8sw\scipy_46a2c46b25884e73b044795d4031c57c\.mesonpy-ouof6i1j\build\meson-logs\meson-log.txt
+ meson setup --native-file=C:\Users\mharvest\AppData\Local\Temp\pip-install-jvemq8sw\scipy_46a2c46b25884e73b044795d4031c57c\.mesonpy-native-file.ini -Ddebug=false -Doptimization=2 --prefix=C:\Users\mharvest\AppData\Local\Programs\Python\Python311-32 C:\Users\mharvest\AppData\Local\Temp\pip-install-jvemq8sw\scipy_46a2c46b25884e73b044795d4031c57c C:\Users\mharvest\AppData\Local\Temp\pip-install-jvemq8sw\scipy_46a2c46b25884e73b044795d4031c57c\.mesonpy-ouof6i1j\build
Traceback (most recent call last):
File "C:\Users\mharvest\AppData\Local\Programs\Python\Python311-32\Lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
main()
File "C:\Users\mharvest\AppData\Local\Programs\Python\Python311-32\Lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mharvest\AppData\Local\Programs\Python\Python311-32\Lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 130, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mharvest\AppData\Local\Temp\pip-build-env-bjmh2uho\overlay\Lib\site-packages\mesonpy\__init__.py", line 923, in get_requires_for_build_wheel
with _project(config_settings) as project:
File "C:\Users\mharvest\AppData\Local\Programs\Python\Python311-32\Lib\contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "C:\Users\mharvest\AppData\Local\Temp\pip-build-env-bjmh2uho\overlay\Lib\site-packages\mesonpy\__init__.py", line 902, in _project
with Project.with_temp_working_dir(
File "C:\Users\mharvest\AppData\Local\Programs\Python\Python311-32\Lib\contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "C:\Users\mharvest\AppData\Local\Temp\pip-build-env-bjmh2uho\overlay\Lib\site-packages\mesonpy\__init__.py", line 547, in with_temp_working_dir
yield cls(source_dir, tmpdir, build_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mharvest\AppData\Local\Temp\pip-build-env-bjmh2uho\overlay\Lib\site-packages\mesonpy\__init__.py", line 463, in __init__
self._configure(reconfigure=bool(build_dir) and not native_file_mismatch)
File "C:\Users\mharvest\AppData\Local\Temp\pip-build-env-bjmh2uho\overlay\Lib\site-packages\mesonpy\__init__.py", line 494, in _configure
self._meson(
File "C:\Users\mharvest\AppData\Local\Temp\pip-build-env-bjmh2uho\overlay\Lib\site-packages\mesonpy\__init__.py", line 477, in _meson
return self._proc('meson', *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mharvest\AppData\Local\Temp\pip-build-env-bjmh2uho\overlay\Lib\site-packages\mesonpy\__init__.py", line 472, in _proc
subprocess.check_call(list(args))
File "C:\Users\mharvest\AppData\Local\Programs\Python\Python311-32\Lib\subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['meson', 'setup', '--native-file=C:\\Users\\mharvest\\AppData\\Local\\Temp\\pip-install-jvemq8sw\\scipy_46a2c46b25884e73b044795d4031c57c\\.mesonpy-native-file.ini', '-Ddebug=false', '-Doptimization=2', '--prefix=C:\\Users\\mharvest\\AppData\\Local\\Programs\\Python\\Python311-32', 'C:\\Users\\mharvest\\AppData\\Local\\Temp\\pip-install-jvemq8sw\\scipy_46a2c46b25884e73b044795d4031c57c', 'C:\\Users\\mharvest\\AppData\\Local\\Temp\\pip-install-jvemq8sw\\scipy_46a2c46b25884e73b044795d4031c57c\\.mesonpy-ouof6i1j\\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.

Judging from the traceback you appear to be using 32-bit Python3.11
There are no 32-bit wheels available for scipy-1.9.2. Whilst there are 32-bit wheels available for 1.9.1, but don't target Python 3.11.
Installing a 64 bit Python interpreter should fix this issue. Although Python3.11 hasn't been released yet you can find the 64-bit installer at https://www.python.org/downloads/release/python-3110rc2/

install scipy 1.8.1 version
it's solve my problem install it and if you get "ould not build wheels for scipy which use PEP 517 and cannot be installed directly"
error.
upgrade pip

The important part of the error message is ERROR: Unknown compiler(s), informing us that a C compiler was not found:
..\..\meson.build:1:0: ERROR: Unknown compiler(s): [['icl'], ['cl'], ['cc'], ['gcc'], ['clang'], ['clang-cl'], ['pgcc']]
After you fix this, you're also going to need a C++ compiler, a Fortran compiler, the Python header files, cmake, and a handful of other low-level tools.
TL;DR: Compiling SciPy on Windows is hard. You might follow Andrew Nelson's suggestion to install a 64-bit version of Python and use pip to fetch pre-built wheels. Or you might setup Anaconda/Miniconda for Windows and install SciPy with:
conda install scipy
Further Reading:
"Building NumPy and SciPy on Windows is more difficult ... please do not expect these instructions to be accurate in the long-run ...." (from: Scipy: Building from Source on Windows)
You'll need to install the Microsoft Visual Studio as a prerequisite. If your prompt cannot find cl, "then either you are not using a developer command prompt, or something is wrong with your installation of Visual Studio." (from: Microsoft Windows. Walkthrough: Compile a C program on the command line)

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.

Error when deploying app on azure app service

I get this error message when I deploy my app from github to the azure app service.
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
Package libparted was not found in the pkg-config search path.
Perhaps you should add the directory containing `libparted.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libparted' found
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/tmp/pip-install-duf5fzoq/pyparted_8a4ebfd316a743d7b84f7e1e0c77cc80/setup.py", line 60, in
check_mod_version('libparted', need_libparted_version)
File "/tmp/pip-install-duf5fzoq/pyparted_8a4ebfd316a743d7b84f7e1e0c77cc80/setup.py", line 54, in check_mod_version
modversion = subprocess.check_output(["pkg-config", "--modversion", module]).decode('utf-8').split()[0]
File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['pkg-config', '--modversion', 'libparted']' 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: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
This is most likely because you have not installed the package. There are several ways to do this but the easiest is to install via the Kudu console.
The Kudu console gives you direct, elevated command-line access to the App Service server and its file system. This is both a valuable debugging tool and allows for CLI operations such as installing packages.
Use python.exe -m pip install <package_name> to install a package.
Full Instructions are here:
https://learn.microsoft.com/en-us/visualstudio/python/managing-python-on-azure-app-service?view=vs-2022#azure-app-service-kudu-console

Unable to install autodock vina (potentially due to boost)

As part of a script I am writing, I need to install the package autodock vina for the purpose of ligand and protein binding. Every time I attempt to "pip install vina", I recieve an error message " ValueError: Boost library location was not found!". Upon attempting to install boost manually, I have been unable to run the bootstrap file, as it does not make the b2 folder that online tutorials say it will make.
To resolve this issue, I installed conda, and made an active environment with every single prerequisite, including boost, installed. I have checked for the version of all of these prerequisites and confirmed their existence, as well as double and triple-checking that I am in the write active environment. Upon installation, I either get the same issue (using conda install vina) or when using "conda install -c bioconda autodock-vina", I get a message saying that the package does not exist (despite adding cforge and bioconda as active package handlers, and the existence of said package is clearly documented online). Does anyone have any suggestions? I've been attempting to install this piece of software for 3 days and I've completely exhausted the documentation, as well as all other similar question answers, with nothing working.
Full error message:
Collecting vina
Using cached vina-1.2.3.tar.gz (95 kB)
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
╰─> [56 lines of output]
Version found 1.2.3 (from __init__.py)
running egg_info
creating vina.egg-info
writing vina.egg-info\PKG-INFO
writing dependency_links to vina.egg-info\dependency_links.txt
writing requirements to vina.egg-info\requires.txt
writing top-level names to vina.egg-info\top_level.txt
writing manifest file 'vina.egg-info\SOURCES.txt'
Boost library is not installed in this conda environment.
Traceback (most recent call last):
File "C:\Users\chris\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
main()
File "C:\Users\chris\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\chris\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 130, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\build_meta.py", line 177, in get_requires_for_build_wheel
return self._get_build_requires(
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\build_meta.py", line 159, in _get_build_requires
self.run_setup()
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\build_meta.py", line 174, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 346, in <module>
setup(
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 148, in setup
return run_commands(dist)
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 163, in run_commands
dist.run_commands()
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 967, in run_commands
self.run_command(cmd)
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\dist.py", line 1214, in run_command
super().run_command(command)
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 308, in run
self.find_sources()
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 315, in find_sources
mm.run()
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 550, in run
self.add_defaults()
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 587, in add_defaults
sdist.add_defaults(self)
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\_distutils\command\sdist.py", line 228, in add_defaults
self._add_defaults_ext()
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\_distutils\command\sdist.py", line 311, in _add_defaults_ext
build_ext = self.get_finalized_command('build_ext')
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 299, in get_finalized_command
cmd_obj.ensure_finalized()
File "C:\Users\chris\AppData\Local\Temp\pip-build-env-r7vbpka4\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "setup.py", line 247, in finalize_options
raise ValueError(error_msg)
ValueError: Boost library location was not found!
Directories searched: conda env, /usr/local/include and /usr/include.
[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.
I also get this error. I asked ResearchGate how to solve this problem and Cheng Shen adviced to use WSL/WSL2 to simulate a Linux environment and then run conda install -c bioconda vina (or another command like this)
What I did.
Install WSL and Ubuntu on Windows 2. Run code . in WSL terminal (for installing VS Code [recommended])
Install Anaconda/Miniconda following this guide
Type conda install -c bioconda vina in Ubuntu terminal (bioconda channel will download all required packages - boost, swig, etc.)
Vina should be successfully installed ( vina --version in WSL Terminal to check)
I found it much easier to install packages for docking via WSL and use VS Code to run scripts there. It's VERY easier than trying to solve this problem by configuring boost for Windows. If you have any questions you can ask me in ResearchGate.

Cannot install PyQt6 in python 3.9. error: metadata-generation-failed and error: subprocess-exited-with-error

This is a new raspberry pi environment with default python 3.9.2. The pip version is 22.0.4. I can install pyqt5, but my project requires pyqt6.
There are two errors always occur: 'error: metadata-generation-failed' and 'error: subprocess-exited-with-error'.
pi#raspberrypi:~ $ pip --version
pythonpip 22.0.4 from /home/pi/.local/lib/python3.9/site-packages/pip (python 3.9)
pi#raspberrypi:~ $ pip install pyqt6
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pyqt6
Using cached PyQt6-6.2.3.tar.gz (1.0 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
╰─> [29 lines of output]
Traceback (most recent call last):
File "/home/pi/.local/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 "/home/pi/.local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/home/pi/.local/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 "/home/pi/.local/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 "/tmp/pip-build-env-5inxj2op/overlay/lib/python3.9/site-packages/sipbuild/api.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "/tmp/pip-build-env-5inxj2op/overlay/lib/python3.9/site-packages/sipbuild/abstract_project.py", line 83, in bootstrap
project.setup(pyproject, tool, tool_description)
File "/tmp/pip-build-env-5inxj2op/overlay/lib/python3.9/site-packages/sipbuild/project.py", line 594, in setup
self.apply_user_defaults(tool)
File "project.py", line 67, in apply_user_defaults
super().apply_user_defaults(tool)
File "/tmp/pip-build-env-5inxj2op/overlay/lib/python3.9/site-packages/pyqtbuild/project.py", line 70, in apply_user_defaults
super().apply_user_defaults(tool)
File "/tmp/pip-build-env-5inxj2op/overlay/lib/python3.9/site-packages/sipbuild/project.py", line 241, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "/tmp/pip-build-env-5inxj2op/overlay/lib/python3.9/site-packages/pyqtbuild/builder.py", line 67, in apply_user_defaults
raise PyProjectOptionException('qmake',
sipbuild.pyproject.PyProjectOptionException
[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 ideas?
This is not a fix but maybe a solution for someone who want to use pyqt6 on Raspberry Pi:
I tried for hours and hours to install PyQt6 on my Raspberry Pi because i developed an application in a virtual machine and wanted to use it on a RP4. I tried with Raspberry Pi OS, Ubuntu 22.10 and PopOS with Python 3.8, 3.9, 3.10 and 3.11 (in venv), but everytime when i used pip install pyqt6 i got this error "metadata generation failed". I installed all the dependecies and side-packages (at least i assume) - nothing worked.
At this point i was sure it had something to do with the architecture (aarch64), but on the other hand i had read that people got it running on RP... Then i discovered that there is a package for Arch-Linux "https://archlinuxarm.org/packages/aarch64/python-pyqt6". I gave it a try.
Flashed my RP4 again and installed Manjaro ARM Gnome 22.12 from Raspberry Pi Imager (v1.7.3).
PyQt5 was already pre installed which made me confident. I installed "python-pyqt6" from the Package Manager and checked optional pyqt6-tools. There are a lot of dependencies which are installed automatically. On first use the Package manager will propably update a lot of packages. This will take a while. PyQt6 will install at the end.
I also had to unset the environment variable QT_QPA_PLATFORM. But then , finally , my pyqt6-application was running on Raspberry PI.
I am currently using Python 3.10.9

pip - unable to find vcvarsall.bat

From last week, I tried to solve this but couldn't fix this error. While, I tried to install, following error comes:
C:\Users\#######>pip install pyproj
Collecting pyproj
Using cached pyproj-1.9.5.1.tar.gz
Complete output from command python setup.py egg_info:
using bundled proj4..
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\H~1\AppData\Local\Temp\pip-build-e4o66o1z\pyproj\setup.py", line 72, in <module>
objects = cc.compile(['nad2bin.c', 'src/pj_malloc.c'])
File "C:\Users\######\Anaconda3\lib\distutils\_msvccompiler.py", line 317, in compile
self.initialize()
File "C:\Users\########\Anaconda3\lib\distutils\_msvccompiler.py", line 210, in initialize
vc_env = _get_vc_env(plat_spec)
File "C:\Users\#######\Anaconda3\lib\distutils\_msvccompiler.py", line 85, in _get_vc_env
raise DistutilsPlatformError("Unable to find vcvarsall.bat")
distutils.errors.DistutilsPlatformError: Unable to find vcvarsall.bat
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\H~1\AppData\Local\Temp\pip-build-e4o66o1z\pyproj\
I couldn't proceed ahead without fixing this error. I have installed Microsoft Visual C++.
Installing some Python packages under Windows can be troublesome. You can find a precompiled package at
http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyproj
Just download the .whl file that suits your Python version then install it using
pip install <filename>.whl

Categories