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.
Related
I've been working on a VR AI chat bot however the one dependency I need is pyopenjtalk and it simply refuses to install.
Collecting pyopenjtalk
Using cached pyopenjtalk-0.3.0.tar.gz (1.5 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
╰─> [25 lines of output]
setup.py:26: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
_CYTHON_INSTALLED = ver >= LooseVersion(min_cython_ver)
Traceback (most recent call last):
File "C:\ProgramData\miniforge3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 351, in <module>
main()
File "C:\ProgramData\miniforge3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 333, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\ProgramData\miniforge3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\re\AppData\Local\Temp\pip-build-env-a_tp6_20\overlay\Lib\site-packages\setuptools\build_meta.py", line 162, in get_requires_for_build_wheel
return self._get_build_requires(
File "C:\Users\re\AppData\Local\Temp\pip-build-env-a_tp6_20\overlay\Lib\site-packages\setuptools\build_meta.py", line 143, in _get_build_requires
self.run_setup()
File "C:\Users\re\AppData\Local\Temp\pip-build-env-a_tp6_20\overlay\Lib\site-packages\setuptools\build_meta.py", line 267, in run_setup
super(_BuildMetaLegacyBackend,
File "C:\Users\re\AppData\Local\Temp\pip-build-env-a_tp6_20\overlay\Lib\site-packages\setuptools\build_meta.py", line 158, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 153, in <module>
File "C:\ProgramData\miniforge3\lib\subprocess.py", line 503, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\ProgramData\miniforge3\lib\subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\ProgramData\miniforge3\lib\subprocess.py", line 1440, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
[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 assume the "FileNotFoundError: [WinError 2] The system cannot find the file specified" is the issue but I have no idea what file is not being found.
Can someone please help me as to why this keeps breaking?
I've tried everything from reinstalling python entirely, using different command lines, reinstalling cmake, cython and also ensuring I had C/C++ compilers which was specified in the requirements however it still does not install.
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)
The output shows
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/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411
Build dir: /private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411/.mesonpy-0ypirwuf/build
Build type: native build
Project name: SciPy
Project version: 1.9.0
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/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411/.mesonpy-0ypirwuf/build/meson-logs/meson-log.txt
+ meson setup --native-file=/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411/.mesonpy-native-file.ini -Ddebug=false -Doptimization=2 --prefix=/Library/Frameworks/Python.framework/Versions/3.10 /private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411 /private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411/.mesonpy-0ypirwuf/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/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-build-env-k7yc84gu/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 909, 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/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-build-env-k7yc84gu/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 888, 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/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-build-env-k7yc84gu/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 547, in with_temp_working_dir
yield cls(source_dir, tmpdir, build_dir)
File "/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-build-env-k7yc84gu/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 463, in __init__
self._configure(reconfigure=bool(build_dir) and not native_file_mismatch)
File "/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-build-env-k7yc84gu/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 494, in _configure
self._meson(
File "/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-build-env-k7yc84gu/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 477, in _meson
return self._proc('meson', *args)
File "/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-build-env-k7yc84gu/overlay/lib/python3.10/site-packages/mesonpy/__init__.py", line 472, 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/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411/.mesonpy-native-file.ini', '-Ddebug=false', '-Doptimization=2', '--prefix=/Library/Frameworks/Python.framework/Versions/3.10', '/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411', '/private/var/folders/7j/kvhbym5j0q9499lwlx3p8hh80000gn/T/pip-install-jv74wxwd/scipy_4adc41f671b54d0b9da66215aabea411/.mesonpy-0ypirwuf/build']' returned non-zero exit status 1.
[end of output]
How should i fix it ?
It seems that you are missing gfortran a fortran compiler nesscary for installing scipy. Try installing gfortran from here.
If that doesn't help, you can install scipy from wheel here. Then run pip install filename.whl to install the package.
Or try a different installation method listed on scipy's website.
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
I have been trying to install yajl>=0.3.5 package and i get the following error. This happens for only this specific package and not for others i am currently using. The command is as follows.
pip install yajl>=0.3.5
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\ANURAG~1\AppData\Local\Temp\pip-build-epamw9qh\yajl\
Alternatively
I know there is a similar question asked and have tried all specified solutions in the mentioned question. Here are my findings.
1) I have successfully installed setuptools,upgraded them and also installed ez_setup. pip install yajl>=0.3.5 gives the same error as above even after this.
2) I have downloaded the source code of yajl>=0.3.5 and tried the following command.
cd yajl && python setup.py bdist_wheel
the error i get is as below.
Collecting yajl>=0.3.5
Using cached yajl-0.3.5.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\ANURAG~1\AppData\Local\Temp\pycharm-packaging\yajl\setup.py",
line 64, in
subprocess.call(['git', 'submodule', 'update',])
File "C:\Program Files\Python\lib\subprocess.py", line 560, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Program Files\Python\lib\subprocess.py", line 950, in init
restore_signals, start_new_session)
File "C:\Program Files\Python\lib\subprocess.py", line 1220, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\ANURAG~1\AppData\Local\Temp\pycharm-packaging\yajl\
PS: I am using windows 10.