Can't install scikit-learn on mac - python

I am trying to install scikit-learn and scipy packages in Python. I've already installed NumPy and Pandas successfully. Then I used following command:
pip install scikit-learn
and I received following error:
File "/private/tmp/pip-build-env-w7wmv28v/overlay/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 278, in get_tag
assert tag in supported_tags, "would build wheel with unsupported tag {}".format(tag)
AssertionError: would build wheel with unsupported tag ('cp39', 'cp39', 'macosx_11_0_universal2')
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies 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.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies 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 am using python 3.9.10, and a mac computer. What should I do?

Have you tried this?:
pip install sklearn

Related

Snowflake-connector-python fails to install. Returns "ModuleNotFoundError: No module named 'cmake'"

I'm trying to install snowflake-connector-python using pip, but it's giving me this error stack trace:
copying pyarrow/tests/parquet/test_metadata.py -> build/lib.macosx-10.9-universal2-cpython-311/pyarrow/tests/parquet
copying pyarrow/tests/parquet/test_pandas.py -> build/lib.macosx-10.9-universal2-cpython-311/pyarrow/tests/parquet
copying pyarrow/tests/parquet/test_parquet_file.py -> build/lib.macosx-10.9-universal2-cpython-311/pyarrow/tests/parquet
copying pyarrow/tests/parquet/test_parquet_writer.py -> build/lib.macosx-10.9-universal2-cpython-311/pyarrow/tests/parquet
running build_ext
creating /private/var/folders/4c/xj1m5wts0xx46bbh5qhhhg4m0000gq/T/pip-install-v4ysgr2_/pyarrow_ae70c3da10594e6eb24b27149ad7d95d/build/temp.macosx-10.9-universal2-cpython-311
-- Running cmake for pyarrow
cmake -DPYTHON_EXECUTABLE=/Users/gree030/Workspace/projectName/venv/bin/python -DPython3_EXECUTABLE=/Users/gree030/Workspace/projectName/venv/bin/python "" -DPYARROW_BUILD_CUDA=off -DPYARROW_BUILD_FLIGHT=off -DPYARROW_BUILD_GANDIVA=off -DPYARROW_BUILD_DATASET=off -DPYARROW_BUILD_ORC=off -DPYARROW_BUILD_PARQUET=off -DPYARROW_BUILD_PARQUET_ENCRYPTION=off -DPYARROW_BUILD_PLASMA=off -DPYARROW_BUILD_S3=off -DPYARROW_BUILD_HDFS=off -DPYARROW_USE_TENSORFLOW=off -DPYARROW_BUNDLE_ARROW_CPP=off -DPYARROW_BUNDLE_BOOST=off -DPYARROW_GENERATE_COVERAGE=off -DPYARROW_BOOST_USE_SHARED=on -DPYARROW_PARQUET_USE_SHARED=on -DCMAKE_BUILD_TYPE=release /private/var/folders/4c/xj1m5wts0xx46bbh5qhhhg4m0000gq/T/pip-install-v4ysgr2_/pyarrow_ae70c3da10594e6eb24b27149ad7d95d
error: command 'cmake' failed: No such file or directory
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pyarrow
Failed to build pyarrow
ERROR: Could not build wheels for pyarrow, which is required to install pyproject.toml-based projects
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies 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.
Here are my environments:
Python version: 3.11.1
pip version: 22.3.1
I tried installing and updating cmake but it still gave me this error:
copying pyarrow/tests/parquet/test_pandas.py -> build/lib.macosx-10.9-universal2-cpython-311/pyarrow/tests/parquet
copying pyarrow/tests/parquet/test_parquet_file.py -> build/lib.macosx-10.9-universal2-cpython-311/pyarrow/tests/parquet
copying pyarrow/tests/parquet/test_parquet_writer.py -> build/lib.macosx-10.9-universal2-cpython-311/pyarrow/tests/parquet
running build_ext
creating /private/var/folders/4c/xj1m5wts0xx46bbh5qhhhg4m0000gq/T/pip-install-ejkkok_0/pyarrow_e560da15c45d4feeb95b2060af382048/build/temp.macosx-10.9-universal2-cpython-311
-- Running cmake for pyarrow
cmake -DPYTHON_EXECUTABLE=/Users/gree030/Workspace/projectName/venv/bin/python -DPython3_EXECUTABLE=/Users/gree030/Workspace/projectName/venv/bin/python "" -DPYARROW_BUILD_CUDA=off -DPYARROW_BUILD_FLIGHT=off -DPYARROW_BUILD_GANDIVA=off -DPYARROW_BUILD_DATASET=off -DPYARROW_BUILD_ORC=off -DPYARROW_BUILD_PARQUET=off -DPYARROW_BUILD_PARQUET_ENCRYPTION=off -DPYARROW_BUILD_PLASMA=off -DPYARROW_BUILD_S3=off -DPYARROW_BUILD_HDFS=off -DPYARROW_USE_TENSORFLOW=off -DPYARROW_BUNDLE_ARROW_CPP=off -DPYARROW_BUNDLE_BOOST=off -DPYARROW_GENERATE_COVERAGE=off -DPYARROW_BOOST_USE_SHARED=on -DPYARROW_PARQUET_USE_SHARED=on -DCMAKE_BUILD_TYPE=release /private/var/folders/4c/xj1m5wts0xx46bbh5qhhhg4m0000gq/T/pip-install-ejkkok_0/pyarrow_e560da15c45d4feeb95b2060af382048
Traceback (most recent call last):
File "/Users/gree030/Workspace/projectName/venv/bin/cmake", line 5, in <module>
from cmake import cmake
ModuleNotFoundError: No module named 'cmake'
error: command '/Users/gree030/Workspace/projectName/venv/bin/cmake' 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 pyarrow
Failed to build pyarrow
ERROR: Could not build wheels for pyarrow, which is required to install pyproject.toml-based projects
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies 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 followed the documentation here and dependency installment guide here on how to install the connector and downloaded the dependent libraries using:
pip install -r https://raw.githubusercontent.com/snowflakedb/snowflake-connector-python/main/tested_requirements/requirements_311.reqs
given that my python version is 3.11.0.
It turns out that the build dependencies were causing the problem. One of the dependencies pyarrow seems to be triggering the error when using python 3.11 at the time of this writing. Downgrading to python version 3.9.16 solved the issue with installing snowflake-connector-python.

Error while installing apache superset Could not build wheels for numpy, which is required to install pyproject.toml-based projects [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies 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.
pip install apache-superset

workaround for this module?

Im trying to install pwntools on OSX but theres a little bump in the installation process, for some reason, there is this module called "unicorn" that uses a setup.py which is deprecated, is there a work around for this?
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [4 lines of output]
running bdist_wheel
running build
Building C extensions
error: [Errno 2] No such file or directory: '/private/var/folders/6p/l9f35jf50_v8j2yq_1l5h62w0000gp/T/pip-install-fbw0k5so/unicorn_8ea27fd7a2de4d1ea34a12cce6c691c5/../../include/unicorn'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for unicorn
Running setup.py clean for unicorn
Failed to build unicorn
Installing collected packages: unicorn, sortedcontainers, pyserial, pyelftools, urllib3, ropgadget, python-dateutil, pysocks, pyparsing, pygments, pycparser, psutil, plumbum, pathlib2, MarkupSafe, intervaltree, idna, charset-normalizer, certifi, bcrypt, rpyc, requests, packaging, mako, colored-traceback, cffi, pynacl, cryptography, paramiko, pwntools
Running setup.py install for unicorn ... error
error: subprocess-exited-with-error
× Running setup.py install for unicorn did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
running install
/opt/homebrew/lib/python3.10/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
Building C extensions
error: [Errno 2] No such file or directory: '/private/var/folders/6p/l9f35jf50_v8j2yq_1l5h62w0000gp/T/pip-install-fbw0k5so/unicorn_8ea27fd7a2de4d1ea34a12cce6c691c5/../../include/unicorn'
[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.
╰─> unicorn
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

I am trying to install pycaret module but getting this error everytime

I am trying to install pycaret module on my system but getting this error every time
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.

Cannot install python-poppler

I am trying to install python-poppler by using pip install python-poppler. I am using a Jupyter Notebook on Windows.
When I run this, I receive the following errors:
RuntimeError: CMake must be installed to build the following extensions: poppler.cpp.modules
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for python-poppler
error: subprocess-exited-with-error
RuntimeError: CMake must be installed to build the following extensions: poppler.cpp.modules
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
I have Cmake installed. Any ideas on how to fix this?

Categories