cannot install scipy on openshift - python

I want to install scikit-learn but this library needs scipy and numpy too.
I tried to add them on the setup.py but I had an error with numpy. I handle to install scikit-learn and numpy from virtenv, but I cannot install scipy.
I tried pip install scipy. The procedure finished without any problem but there isn't any scipy folder on site-packages.
Also, I tried to add only scipy on setup.py. The same as above. The procedure finished without an error but scipy isn't there.
Any help?

I don't know openshift but maybe you can adapt the work that was done to install Atlas / numpy / scipy / scikit-learn on heroku:
https://github.com/dbrgn/heroku-buildpack-python-sklearn
In particular building scipy from source (using pip) requires a fortran compiler (e.g. gfortran) which is probably not installed on OpenShift by default.
Edit: a possible alternative would be to build binary packages for numpy, scipy and scikit-learn using the wheel format and then point the pip install command to an OpenShift blob store that hosts the pre-built packages.
To make sure that the wheel package will work on OpenShift you will have to build them on the same OS (I think it's Redhat 6).
Edit #2: the manylinux1 platform tag was designed to solve this issue and makes it possible to embed the third party libraries you need inside the wheel package. There should be official numpy and scipy wheel files for x86_64 linux. In the mean time you can build them your-self by following the instructions at: https://github.com/pypa/manylinux

You will probably find more info sshing into your app ad typing tail_all.

Related

Error while running azuremlsdk::install_azureml() in R

I'm trying to load an existing azure workspace in RStudio Azure Compute Instance like it's shown in this link: https://azure.github.io/azureml-sdk-for-r/. But, after installing azuremlsdk package when I'm running this code azuremlsdk::install_azureml(). I'm getting this error :
Attempting uninstall: certifi  Found existing installation: certifi2016.9.26ERROR: Cannot uninstall 'certifi'. It is a distutilsinstalled project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.Error: Error installing package(s): 'azureml-sdk==1.10.0', 'numpy', 'pandas'
By referring to this link : https://learn.microsoft.com/en-us/azure/machine-learning/how-to-troubleshoot-environments; I tried to fix this error by running conda remove certifi through terminal of that Compute Instance & Jupyter Notebook of that Compute Instance. But, no luck.
Does anyone have any experience in resolving this issue. Please help.
Azure ML has issues with Python versions and its dependency packages, make sure you are using Python package of 3.5 to 3.8 while installing these.
While installing azureml it will search for all the dependency packages and will install all of them, in this process there will be the version issues, like pandas, numpy.. with different pip versions.
From your stack trace looks like the error is happening when we install the packages like pandas numpy etc along with azureml-train-automl-client package so try to install them before hand by checking its versions which are dependent with you python versions packages.
Check the Azure ML documentation for installation of Azure ML Additional packages.
If you investigate them azureml-train-automl requires somes data science packages including pandas, numpy, and scikit-learn.
Kindly follow below commands for conda environment:
pip install azureml-train-automl
pip install --upgrade azureml-train-automl
pip install show azureml-train-automl
It seems that the Python SDK installation conflicts with itself when using Python 3.6 (the default). I was able to install the SDK for Python 3.7:
azuremlsdk::install_azureml(conda_python_version = '3.7')

Can't install Matplotlib on macOS Big Sur

Since I've upgraded my MacOs to Big Sur I'm having some trouble with my data science libraries. I was able to install the numpy and pandas (even though it took an unusual amount of time as stated at this topic). But can't manage to install the Matplotlib.
I've tried three things...
First with the default MacOs embedded Phyton 3.8.2 .
Reinstalled numpy, upgraded pip, but when I've tried to install Matplotlib. I've got the following error:
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
Later, I've seen some suggestions here at stackoverflow for similar problems, one suggested to use homebrew, so I've installed Python 3.9.0 through brew. However, when I've tried to install Matplotlib, still got a giant error, when it was trying to install Pillow:
(.......) The headers or library files could not be found for jpeg,a required dependency when compiling
Pillow from source.Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
ERROR: Command errored out with exit status 1: /usr/local/opt/python#3.9/bin/python3.9 (...)
To finish (in almost despair) I've tried to create a virtual environment using venv (& Python 3.8.2) and was able to install NumPy successfully, however, I've got the following error trying to install Matplotlib:
(...... long line of code....) The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.
This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand. Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.
Really don't know what to do... Is it impossible to use Matplotlib with a clean install on BigSur? hahaha =(
I did it!!! I fix it!!
For this error :
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
I fixed installing an older numpy version.
pip3 install --force-reinstall numpy\<1.19
It did the job.
For the second error:
(.......) The headers or library files could not be found for jpeg,a required dependency when compiling
Pillow from source.Please see the install instructions at: https://pillow.readthedocs.io/en/latest/installation.html
ERROR: Command errored out with exit status 1: /usr/local/opt/python#3.9/bin/python3.9 (...)
It was the missing JPEG library. I do recommend you guys install homebrew.
Solved this problem with:
brew install libjpeg
your easy_install is outdated.so just update your setup_tools by excuting following command:
pip install setuptools==51
then
easy_install --version
make sure your easy_install's version is above 51.

SciPy can't install old version Windows 10

I'm trying to install an older version of SciPy (either 0.16.1 or 0.17.0), but when I try to use pip I get the result:
pip install scipy==0.16.1
I get the following message
Failed building wheel for scipy
So I found the .whl file here https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy but the problem is that the version here is 1.0.1, and I can't seem to find any older ones, even in the SciPy website (there are for linux and mac)
.
.
PS.
I need to use either of this versions because I'm trying to run Theano on a GPU, and the tutorial provided here http://deeplearning.net/software/theano/install_windows.html says this version is a requirement if there is any tutorial that is better and more up-to-date I would be appreciated

Pip is not installing any libraries

I have been trying to install numpy using pip on Windows.
But it doesn't seem to be working.
I tried installing numpy and t told me that microsoft C++ package is missing and asked me to install it. I did that and tried re-installing numpy. But this time it doesn't seems to work. It doesn't seem to forward after this point
C:\Users\neil>pip install numpy
Collecting numpy
Using cached numpy-1.9.1.tar.gz
Running from numpy source directory.
Installing collected packages: numpy
Running setup.py install for numpy
Then I tried installing scipy, even that doesn't seem to move forward after this point.
C:\Users\neil>pip install scipy
Collecting scipy
Downloading scipy-0.14.1.tar.gz (10.9MB)
100% |################################| 10.9MB 284kB/s ta 0:00:01
You could use Anaconda. Anaconda is a completely free Python distribution (including for commercial use and redistribution). It includes over 195 of the most popular Python packages for science, math, engineering, data analysis (including numpy and scipy).
After downloading the Anaconda installer, double click on the installer application icon and run it.
Follow the instructions in the installer.
The installer is also capable of running in silent mode, without bringing up the graphical interface. To install Anaconda, type the following command into a command prompt:
> Anaconda-2.x.x-Windows-x86[_64].exe /S /D=C:\Anaconda
Good luck.

Why does installing numpy using pip fail, while building directly does not?

I'm trying to install numpy under Python 3.3.0 running Mac OS 10.7.5 (Lion) and using the compilers that come with Xcode 4.5.1. I installed Python 3 and gfortran using homebrew without any hiccups, but pip3 install numpy fails. Looking at other suggestions online, I tried setting Clang as the C compiler using:
export CC=clang
export CXX=clang
export FFLAGS=-ff2c
but received the same error. The final line reports ValueError: underlying buffer has been detached, and I posted the full output.
So, instead I tried building directly from source using the instructions from SciPy.org. This appears to succeed; the build and install processes run to completion, although they are not shy about reporting warnings. The full log is again available as a Gist. I can then run numpy.test('full') from Python 3, and although there are some warnings about unclosed files that I don't understand, it reports that all tests pass.
Does anyone know why pip fails to build NumPy when I can apparently do it manually without a problem?
It looks like numpy now provides wheels on pypi, which should install correctly without needing to compile anything locally on your machine when using pip.

Categories