How to fix Error in pip install pandas===1.1.2: subprocess-exited-with-error - pandas

When I tried running pip install pandas===1.1.2, it throws this long error:
Collecting pandas===1.1.2
Using cached pandas-1.1.2.tar.gz (5.2 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [3794 lines of output]
Ignoring numpy: markers 'python_version == "3.6" and platform_system != "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.7" and platform_system != "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.6" and platform_system == "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.7" and platform_system == "AIX"' don't match your environment
Ignoring numpy: markers 'python_version >= "3.8" and platform_system == "AIX"' don't match your environment
Collecting setuptools
Using cached setuptools-65.4.1-py3-none-any.whl (1.2 MB)
Collecting wheel
Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Collecting Cython<3,>=0.29.16
Using cached Cython-0.29.32-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (1.9 MB)
Collecting numpy==1.17.3
Using cached numpy-1.17.3.zip (6.4 MB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: numpy
Building wheel for numpy (setup.py): started
Building wheel for numpy (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [3080 lines of output]
Running from numpy source directory.
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE
...........
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.
╰─> numpy
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
[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 cut the error short because of post limitations. I tried downgrading the python version from 3.10 to 3.8 but the issue still persists. Also, I tried running pip install numpy and it was installed fine. So does anyone know how to fix this issue?
EDIT
another main issue is that the version of python is 3.8 but python3 is 3.10. So I downgraded the python3 version to 3.8 and pip install pandas===1.1.2 worked perfectly downgrade python3 link

Could you try to install an older version of pip after then try again?
pip install pip==21.3.1

Related

tensorflow-gpu install error like this..T.T python:3.10 tensorflow: 2.11.0 CUDA 10.1 cuDNN 8.0.3

C:\Users\CITADEL>pip install tensorflow-gpu
Collecting tensorflow-gpu
Using cached tensorflow-gpu-2.12.0.tar.gz (2.6 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: python_version>"3.7" in c:\users\citadel\appdata\local\programs\python\python310\lib\site-packages (from tensorflow-gpu) (0.0.2)
Building wheels for collected packages: tensorflow-gpu
Building wheel for tensorflow-gpu (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\CITADEL\AppData\Local\Temp\pip-install-3o7_0drd\tensorflow-gpu_b2c72ac2351448d18a87a109721775f4\setup.py", line 37, in
raise Exception(TF_REMOVAL_WARNING)
Exception:
=========================================================
The "tensorflow-gpu" package has been removed!
Please install "tensorflow" instead.
Other than the name, the two packages have been identical
since TensorFlow 2.1, or roughly since Sep 2019. For more
information, see: pypi.org/project/tensorflow-gpu
=========================================================
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for tensorflow-gpu
Running setup.py clean for tensorflow-gpu
Failed to build tensorflow-gpu
Installing collected packages: tensorflow-gpu
Running setup.py install for tensorflow-gpu ... error
error: subprocess-exited-with-error
× Running setup.py install for tensorflow-gpu did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\CITADEL\AppData\Local\Temp\pip-install-3o7_0drd\tensorflow-gpu_b2c72ac2351448d18a87a109721775f4\setup.py", line 37, in
raise Exception(TF_REMOVAL_WARNING)
Exception:
=========================================================
The "tensorflow-gpu" package has been removed!
Please install "tensorflow" instead.
Other than the name, the two packages have been identical
since TensorFlow 2.1, or roughly since Sep 2019. For more
information, see: pypi.org/project/tensorflow-gpu
=========================================================
[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.
╰─> tensorflow-gpu
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
tensorflow-gpu and tensorflow are the same package since the release of version 2.1. Installing tensorflow alone will enable GPU acceleration.
You can refer to the this link it has more details.

Pipx can not build packages when trying to install eth-brownie

I got a following error code while trying to install brownie through pipx (by typing "pipx install eth-brownie)
PS C:\Users\J.M\demos\brownie_simple_storage> pipx install eth-brownie
Fatal error from pip prevented installation. Full pip output in file:
C:\Users\J.M\.local\pipx\logs\cmd_2023-01-08_01.26.02_pip_errors.log
pip failed to build packages:
bitarray
cytoolz
lru-dict
multidict
psutil
regex
yarl
Some possibly relevant errors from pip install:
error: subprocess-exited-with-error
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
Error installing eth-brownie.
PS C:\Users\J.M\demos\brownie_simple_storage>
I have all the prerequirements (node.js, recent python version, ganache cli, npm all successfully installed), I really have no idea why it can't build those packages.

cannot install required dependencies into my Conda environment

the command I typed is "python3 -m pip install -r requirements.txt".
I think the first error is that the library mkl_rt is missing but I'm not sure how to add.
Complete log:
Defaulting to user installation because normal site-packages is not writeable
Collecting Flask==1.1.1
Using cached Flask-1.1.1-py2.py3-none-any.whl (94 kB)
Collecting imutils==0.5.3
Using cached imutils-0.5.3.tar.gz (17 kB)
Preparing metadata (setup.py) ... done
Collecting Keras==2.4.0
Using cached Keras-2.4.0-py2.py3-none-any.whl (170 kB)
Collecting opencv-python==4.4.0.46
Using cached opencv-python-4.4.0.46.tar.gz (88.9 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [4837 lines of output]
Ignoring numpy: markers 'python_version == "3.6"' don't match your environment
Ignoring numpy: markers 'python_version == "3.7"' don't match your environment
Ignoring numpy: markers 'python_version >= "3.9"' don't match your environment
Collecting setuptools
Using cached setuptools-63.4.2-py3-none-any.whl (1.2 MB)
Collecting wheel
Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Collecting scikit-build
Using cached scikit_build-0.15.0-py2.py3-none-any.whl (77 kB)
Collecting cmake
Using cached cmake-3.24.0-py2.py3-none-macosx_10_10_universal2.macosx_10_10_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl (77.9 MB)
Collecting pip
Using cached pip-22.2.2-py3-none-any.whl (2.0 MB)
Collecting numpy==1.17.3
Using cached numpy-1.17.3.zip (6.4 MB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting distro
Using cached distro-1.7.0-py3-none-any.whl (20 kB)
Collecting packaging
Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Building wheels for collected packages: numpy
Building wheel for numpy (setup.py): started
Building wheel for numpy (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [4428 lines of output]
Running from numpy source directory.
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib', '/usr/lib']
NOT AVAILABLE
..............
For now I'm going to try to install the requirements with out the file.
This error occurs when there is a problem between the versions of python and /or pip vs the versions of the packages you're trying to install.
If you know the version of python used to generate the requirements.txt file that you have, please make sure to use the same version. Otherwise try upgrading the version of python.

Can't pip install scipy on M1

I can't "pip instal scipy" on my m1 mac, I get an error:
Collecting scipy
Using cached scipy-1.7.3.tar.gz (36.1 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [3280 lines of output]
Looking in indexes: https://pypi.org/simple, https://pypi.dev.project.com/pypi/, https://pypi.dev.project.com/pypi/
Ignoring numpy: markers 'python_version == "3.7" and platform_machine == "aarch64"' don't match your environment
Ignoring numpy: markers 'python_version == "3.8" and platform_machine == "aarch64"' don't match your environment
Ignoring numpy: markers 'python_version == "3.8" and (platform_machine != "arm64" or platform_system != "Darwin") and platform_python_implementation != "PyPy"' don't match your environment
Ignoring numpy: markers 'python_version == "3.9" and (platform_machine != "arm64" or platform_system != "Darwin") and platform_python_implementation != "PyPy"' don't match your environment
Ignoring numpy: markers 'python_version == "3.10" and platform_python_implementation != "PyPy"' don't match your environment
Ignoring numpy: markers 'python_version == "3.7" and platform_python_implementation == "PyPy"' don't match your environment
Ignoring numpy: markers 'python_version == "3.8" and platform_python_implementation == "PyPy"' don't match your environment
Ignoring numpy: markers 'python_version == "3.9" and platform_python_implementation == "PyPy"' don't match your environment
Ignoring numpy: markers 'python_version == "3.10" and platform_python_implementation == "PyPy"' don't match your environment
Collecting wheel<0.38.0
Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Collecting setuptools<58.0.0
Using cached setuptools-57.5.0-py3-none-any.whl (819 kB)
Collecting Cython<3.0,>=0.29.18
Using cached Cython-0.29.28-py2.py3-none-any.whl (983 kB)
Collecting pybind11<2.8.0,>=2.4.3
Using cached pybind11-2.7.1-py2.py3-none-any.whl (200 kB)
Collecting pythran<0.10.0,>=0.9.12
Using cached pythran-0.9.12.post1-py3-none-any.whl (4.3 MB)
Collecting numpy==1.16.5
Using cached numpy-1.16.5.zip (5.1 MB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting ply>=3.4
Using cached ply-3.11-py2.py3-none-any.whl (49 kB)
Collecting gast~=0.5.0
Using cached gast-0.5.3-py3-none-any.whl (19 kB)
Collecting beniget~=0.4.0
Using cached beniget-0.4.1-py3-none-any.whl (9.4 kB)
Building wheels for collected packages: numpy
Building wheel for numpy (setup.py): started
Building wheel for numpy (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [2943 lines of output]
Running from numpy source directory.
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/Users/danieljohnson/Documents/code/project/venv/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
blis_info:
customize UnixCCompiler
libraries blis not found in ['/Users/danieljohnson/Documents/code/project/venv/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
openblas_info:
customize UnixCCompiler
customize UnixCCompiler
libraries openblas not found in ['/Users/danieljohnson/Documents/code/project/venv/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
... the end of the error is:
error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Users/danieljohnson/Documents/code/project/venv/lib/python3.7/site-packages/numpy/core/include -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.macosx-12.3-arm64-3.7/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/Users/danieljohnson/Documents/code/project/venv/include -I/Users/danieljohnson/.pyenv/versions/3.7.13/include/python3.7m -Ibuild/src.macosx-12.3-arm64-3.7/numpy/core/src/common -Ibuild/src.macosx-12.3-arm64-3.7/numpy/core/src/npymath -Ibuild/src.macosx-12.3-arm64-3.7/numpy/core/src/common -Ibuild/src.macosx-12.3-arm64-3.7/numpy/core/src/npymath -c build/src.macosx-12.3-arm64-3.7/numpy/core/src/multiarray/_multiarray_tests.c -o build/temp.macosx-12.3-arm64-3.7/build/src.macosx-12.3-arm64-3.7/numpy/core/src/multiarray/_multiarray_tests.o -MMD -MF build/temp.macosx-12.3-arm64-3.7/build/src.macosx-12.3-arm64-3.7/numpy/core/src/multiarray/_multiarray_tests.o.d" failed with 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.
╰─> numpy
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
[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've tried pip and pip3 uninstalling numpy, using older versions, installing scypi with --no-deps.
I can import numpy in a python console.
A "pip show numpy" displays:
Name: numpy
Version: 1.21.6
Summary: NumPy is the fundamental package for array computing with Python.
Home-page: https://www.numpy.org
Author: Travis E. Oliphant et al.
Author-email:
License: BSD
Location: /Users/danieljohnson/Documents/code/project/venv/lib/python3.7/site-packages
Requires:
Required-by: pandas
I'm not sure what to try. I think it either has something to do with the m1 architecture or the install not being able to find numpy for some reason.
I would suggest you to use conda for managing your Python resources on your Mac M1 machine, unless you have a specific reason to stick with pip or pip3.
Below are the key steps that might help you to quickly install scipy package:
Install miniconda on your Mac: please follow step 1 to 6 on this page under the title Installing on MacOS. Don't worry about subpoint, Anaconda Installer for MacOS, in step 1 on the link attached above.
Create a new environment for your work purpose. It's recommended to not install packages in base environment of conda, and that's why I am suggesting for creating new environment. Please follow the sections, Managing conda and Managing environments, on this page.
Set conda-forge as conda's highest priority channel. This means conda will always check if Python packages you want to install are available via conda-forge or not. To do this, please type following lines of code in the terminal:
conda config --add channels conda-forge
conda config --set channel_priority strict
You can read about conda-forge here.
Finally, type conda install scipy in the terminal by activating your non-base conda environment. This should install scipy along with its dependencies with your permission on your machine.

Building tensorflow 1.10 succeeded but package installation fails

I try to build tensorflow 1.10 with cuda from a python3 virtual environment :
./configure succeeded
first step build with bazel succeeded (with the necessity to install additional things)
$ bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
At first time the build failed:
import keras_applications
ModuleNotFoundError: No module named 'keras_applications'
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 9114.151s, Critical Path: 335.72s
INFO: 6696 processes: 6696 local.
FAILED: Build did NOT complete successfully
But after having installed some keras components and h5py:
pip install keras_applications==1.0.4 --no-deps
Collecting keras_applications==1.0.4
Downloading https://files.pythonhosted.org/packages/54/90/8f327deaa37a71caddb59b7b4aaa9d4b3e90c0e76f8c2d1572005278ddc5/Keras_Applications-1.0.4-py2.py3-none-any.whl (43kB)
100% |████████████████████████████████| 51kB 633kB/s
Installing collected packages: keras-applications
Successfully installed keras-applications-1.0.4
(DeepFish) jeanpat#Dell-T5500:~/Developpement/Arch-TensorFlow/tensorflow$ pip install keras_preprocessing==1.0.2 --no-deps
Collecting keras_preprocessing==1.0.2
Downloading https://files.pythonhosted.org/packages/71/26/1e778ebd737032749824d5cba7dbd3b0cf9234b87ab5ec79f5f0403ca7e9/Keras_Preprocessing-1.0.2-py2.py3-none-any.whl
Installing collected packages: keras-preprocessing
Successfully installed keras-preprocessing-1.0.2
(DeepFish) jeanpat#Dell-T5500:~/Developpement/Arch-TensorFlow/tensorflow$ pip install h5py==2.8.0
Collecting h5py==2.8.0
Downloading https://files.pythonhosted.org/packages/8e/cb/726134109e7bd71d98d1fcc717ffe051767aac42ede0e7326fd1787e5d64/h5py-2.8.0-cp36-cp36m-manylinux1_x86_64.whl (2.8MB)
100% |████████████████████████████████| 2.8MB 1.9MB/s
Requirement already satisfied: numpy>=1.7 in /home/jeanpat/anaconda3/envs/DeepFish/lib/python3.6/site-packages (from h5py==2.8.0) (1.15.0)
Requirement already satisfied: six in /home/jeanpat/anaconda3/envs/DeepFish/lib/python3.6/site-packages (from h5py==2.8.0) (1.11.0)
keras-applications 1.0.4 has requirement keras>=2.1.6, but you'll have keras 2.0.8 which is incompatible.
Installing collected packages: h5py
Found existing installation: h5py 2.7.1
Uninstalling h5py-2.7.1:
Successfully uninstalled h5py-2.7.1
Successfully installed h5py-2.8.0
It was possible to finish the build:
Target //tensorflow/tools/pip_package:build_pip_package up-to-date:
bazel-bin/tensorflow/tools/pip_package/build_pip_package
INFO: Elapsed time: 55.947s, Critical Path: 29.05s
INFO: 40 processes: 40 local.
INFO: Build completed successfully, 43 total actions
second step build succeeded too with some warnings:
$ bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
jeudi 23 août 2018, 15:02:24 (UTC+0200) : === Preparing sources in dir: /tmp/tmp.dEwVvSzrd0
~/Developpement/Arch-TensorFlow/tensorflow ~/Developpement/Arch-TensorFlow/tensorflow
~/Developpement/Arch-TensorFlow/tensorflow
jeudi 23 août 2018, 15:02:31 (UTC+0200) : === Building wheel
warning: no files found matching '.pd' under directory ''
warning: no files found matching '.dll' under directory ''
warning: no files found matching '.lib' under directory ''
warning: no files found matching '*.h' under directory 'tensorflow/include/tensorflow'
warning: no files found matching '*' under directory 'tensorflow/include/Eigen'
warning: no files found matching '*.h' under directory 'tensorflow/include/google'
warning: no files found matching '*' under directory 'tensorflow/include/third_party'
warning: no files found matching '*' under directory 'tensorflow/include/unsupported'
jeudi 23 août 2018, 15:03:09 (UTC+0200) : === Output wheel file is in: /tmp/tensorflow_pkg
Finally I tried to install the python package:
$ pip install /tmp/tensorflow_pkg/tensorflow-1.10.0-py2-none-any.whl
Requirement '/tmp/tensorflow_pkg/tensorflow-1.10.0-py2-none-any.whl' looks like a filename, but the file does not exist
tensorflow-1.10.0-py2-none-any.whl is not a supported wheel on this platform.
Package installation succeeded with:
$ pip install /tmp/tensorflow_pkg/tensorflow*.whl