Can't install scipy to Raspberry pi 4 (raspbian) - python-3.x

I am trying to install the scipy library with python3 -m pip install --user --no-use-pep517 scipy but I am receiving the following error:
ERROR: Failed building wheel for scipy
Running setup.py clean for scipy
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-spokr6ic/scipy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-spokr6ic/scipy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
cwd: /tmp/pip-install-spokr6ic/scipy
I am using that code to install because pip3 install scipy is giving me this error:
ERROR: Failed building wheel for scipy
Failed to build scipy
ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly
How can I resolve this issue?
Python == 3.7.3
PS:The complete traceback is 414 lines. I don't know if I should include here.

Try this:
sudo apt update
sudo apt install -y python3-scipy

Related

Unable to install fitsne in colab

I am trying to install fitsne in colab. Recommended way for installation is:
conda config --add channels conda-forge #if not already in your channels. Needed for fftw.
conda install cython numpy fftw
pip install fitsne
Yet, I get following error:
Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from fitsne) (1.19.5)
Requirement already satisfied: cython in /usr/local/lib/python3.7/dist-packages (from fitsne) (0.29.22)
Building wheels for collected packages: fitsne
Building wheel for fitsne (setup.py) ... error
ERROR: Failed building wheel for fitsne
Running setup.py clean for fitsne
Failed to build fitsne
Installing collected packages: fitsne
Running setup.py install for fitsne ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ezkx1s2e/fitsne/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ezkx1s2e/fitsne/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-uzkyz06_/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
Can someone please explain how to fix such an error in colab?
I solved it using this gist
!git clone https://github.com/KlugerLab/FIt-SNE.git
!wget http://www.fftw.org/fftw-3.3.8.tar.gz
!tar -xf fftw-3.3.8.tar.gz
!cd fftw-3.3.8
!./fftw-3.3.8/configure
!make
!make install
!g++ -std=c++11 -O3 FIt-SNE/src/sptree.cpp FIt-SNE/src/tsne.cpp FIt-SNE/src/nbodyfft.cpp -o FIt-SNE/bin/fast_tsne -pthread -lfftw3 -lm -Wno-address-of-packed-member
import sys; sys.path.append('FIt-SNE/')
from fast_tsne import fast_tsne

Dagster Installation on MacOS Big Sur

I am trying to install Dagster and Dagit using:python3 -m pip install dagster dagit --user
But, Always when it starts to build wheel for grpcio, it throws an error and stops the installation.
ERROR: Command errored out with exit status 1: /Library/Developer/CommandLineTools/usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/cb/vkzjvbbn2l5gbb31y3m61d_40000gp/T/pip-install-3005iws8/grpcio/setup.py'"'"'; __file__='"'"'/private/var/folders/cb/vkzjvbbn2l5gbb31y3m61d_40000gp/T/pip-install-3005iws8/grpcio/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/cb/vkzjvbbn2l5gbb31y3m61d_40000gp/T/pip-record-8m4mi_rs/install-record.txt --single-version-externally-managed --compile --user --prefix= Check the logs for full command output.
Is anyone using Dagster and Dagit on Mac?
EDIT: I was able to install Dagster by providing the required version in my requirements.txt File.
Upgraded the Pip to the latest version bypython3 -m pip install --user --upgrade pip and then installed Dagster!
It worked.
The main installation steps for Dagster are outlined here: https://docs.dagster.io/getting-started/install#installation - however users with M1 Macs have run into issues recently (early 2023) related to grpcio package installation.
If you encounter that issue, you will need this command:
pip install dagster dagit --find-links=https://github.com/dagster-io/build-grpcio/wiki/Wheels

pygame 2.0.0 installation error on m1 macOS Big Sur

I used python3 -m pip install pygame==2.0.0 via non-rosetta terminal and got these errors:
ERROR: Command errored out with exit status 1:
command: /opt/homebrew/opt/python#3.9/bin/python3.9 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/1q/4hfh5j_d715b0vm49lql6vl80000gn/T/pip-install-cqq2oily/pygame_3a311b7a5339480eb6bae08f88ff3fe6/setup.py'"'"'; __file__='"'"'/private/var/folders/1q/4hfh5j_d715b0vm49lql6vl80000gn/T/pip-install-cqq2oily/pygame_3a311b7a5339480eb6bae08f88ff3fe6/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/1q/4hfh5j_d715b0vm49lql6vl80000gn/T/pip-pip-egg-info-ig7pjjbc
cwd: /private/var/folders/1q/4hfh5j_d715b0vm49lql6vl80000gn/T/pip-install-cqq2oily/pygame_3a311b7a5339480eb6bae08f88ff3fe6/
ERROR: Could not find a version that satisfies the requirement pygame==2.0.0
ERROR: No matching distribution found for pygame==2.0.0
My homebrew, pip3 are all up to date.
Any help would be appreciated!
I already had the same problem: the pip module only detected a pygame version older than 2.0.0.
It always installed pygame 1.9.6.
Maybe you should:
1. Upgrade pip
I don't know how pip works, but I updated it by typing
python3 -m pip install --upgrade pip
Then, when I typed again
python3 -m pip install pygame
pip downloaded the 2.0.1 version of pygame correctly.
2. Check your internet connection
Of course the modules come from Internet.

how to install matplotlib with pip

How can I install matplotlib with pip. I have try to use pip install or install from source
I have python 3.9 beta version btw
git clone git#github.com:matplotlib/matplotlib.git
cd matplotlib
python -mpip install .
but I get the following error
$pip install matplotlib
Collecting matplotlib
Using cached matplotlib-3.3.2.tar.gz (37.9 MB)
ERROR: Command errored out with exit status 1:
command: /Users/a/.pyenv/versions/3.9.0b5/bin/python3.9 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/k0/3v16x2k52tdf00j6tpm7wffc0000gp/T/pip-install-vq_esy_g/matplotlib/setup.py'"'"'; __file__='"'"'/private/var/folders/k0/3v16x2k52tdf00j6tpm7wffc0000gp/T/pip-install-vq_esy_g/matplotlib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/k0/3v16x2k52tdf00j6tpm7wffc0000gp/T/pip-pip-egg-info-ny9shc_k
cwd: /private/var/folders/k0/3v16x2k52tdf00j6tpm7wffc0000gp/T/pip-install-vq_esy_g/matplotlib/
Complete output (63 lines):
WARNING: The wheel package is not available.
Edit setup.cfg to change the build options; suppress output with --quiet.
BUILDING MATPLOTLIB
matplotlib: yes [3.3.2]
python: yes [3.9.0b5 (default, Oct 2 2020, 00:38:55) [Clang 11.0.3
(clang-1103.0.32.29)]]
platform: yes [darwin]
sample_data: yes [installing]
tests: no [skipping due to configuration]
macosx: yes [installing]
running egg_info
...
File "/private/var/folders/k0/3v16x2k52tdf00j6tpm7wffc0000gp/T/pip-install-vq_esy_g/matplotlib/setupext.py", line 469, in add_numpy_flags
import numpy as np
File "/private/var/folders/k0/3v16x2k52tdf00j6tpm7wffc0000gp/T/pip-install-vq_esy_g/matplotlib/.eggs/numpy-1.19.2-py3.9-macosx-10.15-x86_64.egg/numpy/__init__.py", line 286, in <module>
raise RuntimeError(msg)
RuntimeError: Polyfit sanity test emitted a warning, most likely due to using a buggy Accelerate backend. If you compiled yourself, see site.cfg.example for information. Otherwise report this to the vendor that provided NumPy.
RankWarning: Polyfit may be poorly conditioned
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Since your python version is 3.9 you can install matplotlib with pip3
pip3 install matplotlib
You can also try
python3 -m pip3 install -U matplotlib
Edit
You may not have installed the setup tools correctly, try :
pip install --upgrade setuptools
and then pip install matplotlib

I'm trying to install fbprophet using pip on windows10 and the following error is showed

I'm trying to install fbprophet using pip on windows10 and the following error is showed
ERROR: Command errored out with exit status 1: 'c:\program
files\python37\python.exe' -u -c 'import sys, setuptools, tokenize;
sys.argv[0] =
'"'"'C:\Users\ARJUNS~1\AppData\Local\Temp\pip-install-v9k4x_8v\fbprophet\setup.py'"'"';
file='"'"'C:\Users\ARJUNS~1\AppData\Local\Temp\pip-install-v9k4x_8v\fbprophet\setup.py'"'"';f=getattr(tokenize,
'"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"',
'"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))'
install --record
'C:\Users\ARJUNS~1\AppData\Local\Temp\pip-record-pjkjdpel\install-record.txt'
--single-version-externally-managed --compile Check the logs for full command output.
I have the pystan packet already installed
I had faced same problem. I used "conda" rather than "pip" for installation with steps shown below and it worked magical for me.
step 1: conda install -c anaconda ephem
step 2:conda install -c conda-forge pystan
step 3: conda install -c conda-forge fbprophet
Now you can go ahead with : "from fbprophet import Prophet" in python environment.

Resources