installing numpy&scipy on centos 6.4 - python-2.7

I am working in a virtual environment and I am having trouble installing numpy and scipy. It is my understanding that I have to full install numpy before going to scipy, but I am having trouble installing numpy.
I usedpip install numpy and that installed numpy into my python2.7/site-packages/numpy directory, however, I am trying to run python setup.py install --user as stated here numpy build and I keep getting the error "this is the wrong file to run". I do not know where to go from here....and I still need to install scipy

numpy and scipy come pre-compiled with CentOS, just type:
sudo yum install numpy scipy
it is always harder to install from source code.

Related

Installing PyMC3 on Anaconda 3 / Win

This installation is a nightmare!!!
Using:
conda install -c conda-forge pymc3
Will not work.
I then tried to install theano first (and its dependencies), found out the hard way that it works with python=3.5, NOT 3.6.
# Install theano reqirements
conda install numpy scipy mkl-service libpython m2w64-toolchain
# Install theano
conda install theano pygpu
# You are using a different python version (3.5) from the base installation,
# you must point to the right kernel for Jupyter:
conda install ipykernel
python -m ipykernel install --user
# Install & test on jupyter, spyder
conda install jupyter spyder qt
# Install PyMC3
pip install pymc3
Everything imports, but then when I run the code the 'NUTS' thing won't initialize...
Not sure which process worked for me but this is the step I took
reset my whole laptop
re-download wsl2
install conda
go to this directory
path_to_your_python_env>/Lib/site-packages/theano/misc/windows.py
delete or comment out following
params['shell'] = True
Even though it works, the compiler is extremely still slows

does pip install -U break virtualenv?

I have a virtualenv where I'm running python 2.7.13. I did install numpy a while ago. Today I wanted to install statsmodels as well in the same virtualenv. That's why I did (according to the webpage):
pip install -U statsmodels
and several packages where updated (numpy among others). I forgot that the -U forces to install the newest version. Since numpy was updated to numpy 1.13.3 I'm not sure if this broke a dependency. Is the forced version 1.13.3 not suitable for the virtualenv? If so how can I remove it and install the correct one. If I'm running
pip uninstall numpy
followed by a
pip install numpy
it says:
pip install numpy
Collecting numpy
Using cached numpy-1.13.3-cp27-cp27mu-manylinux1_x86_64.whl
Installing collected packages: numpy
Successfully installed numpy-1.13.3
Yes, the compatibility with Python is guaranteed: look at the filename of the wheel that is installed: numpy-1.13.3-cp27-cp27mu-manylinux1_x86_64.whl. That matches the Python version you're using (including your OS).
As for statsmodels and the upgraded NumPy: if statsmodels requires numpy 1.13.3, you're fine; that's the whole point of a virtualenv: it doesn't break any other dependencies/virtualenvs you might have set up. It is unlikely you have another package in the same virtualenv that requires a lower version of NumPy.

numpy is not installing in windows 7 soon after get-pip.py

This is the error please help me what to do
i have downloaded all the dependencies but numpy is showing errors
you're using pip3 - that's for Python3.
Try pip install numpy

Scipy package not installing using pip

I am not able to install scipy on my machine with python 2.7
pip install scipy
It always comes up with the following error
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
Just as the message says, You need functioning blas/lapack, which you need to install separately. How to do that depends on the operating system you're on.

How do I install Keras and Theano in Anaconda Python on Windows?

I am trying to work on neural networks in Python using the following Keras packages:
from keras.utils import np_utils
from keras.layers.core import Dense, Activation, Dropout
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation, Flatten
from keras.layers.convolutional import Convolution2D, MaxPooling2D
from keras.optimizers import SGD
But, I am getting the following error:
15 import theano
---> 16 from theano import gof
17 from theano.compat.python2x import partial
18 import theano.compile.mode
ImportError: cannot import name gof
Installing installed conda install keras. Later I tried to use pip install Theano, but it did not work. I Tried to install using pip install git, but I am getting this error: cannot find command git. So I installed Git and I set the environment variables.
So, is there any procedure to install these packages?
It is my solution for the same problem
Install TDM GCC x64.
Install Anaconda x64.
Open the Anaconda prompt
Run conda update conda
Run conda update --all
Run conda install mingw libpython
Install the latest version of Theano,
pip install git+git://github.com/Theano/Theano.git
Run pip install git+git://github.com/fchollet/keras.git
The trick is that you need to create an environment/workspace for Python. This solution should work for Python 2.7 but at the time of writing keras can run on python 3.5, especially if you have the latest anaconda installed (this took me awhile to figure out so I'll outline the steps I took to install KERAS in python 3.5):
Create environment/workspace for Python 3.5
C:\conda create --name neuralnets python=3.5
C:\activate neuralnets
Install everything (notice the neuralnets workspace in parenthesis on each line). Accept any dependencies each of those steps wants to install:
(neuralnets) C:\conda install theano
(neuralnets) C:\conda install mingw libpython
(neuralnets) C:\pip install tensorflow
(neuralnets) C:\pip install keras
Test it out:
(neuralnets) C:\python -c "from keras import backend; print(backend._BACKEND)"
Just remember, if you want to work in the workspace you always have to do:
C:\activate neuralnets
so you can launch Jupyter for example (assuming you also have Jupyter installed in this environment/workspace) as:
C:\activate neuralnets
(neuralnets) jupyter notebook
You can read more about managing and creating conda environments/workspaces
at the follwing URL: https://conda.io/docs/using/envs.html
In windows with anaconda, just go on conda prompt and use this command
conda install --channel https://conda.anaconda.org/conda-forge keras
I use macOS and used to have the same problem.
Running the following command in the terminal saved me:
conda install -c conda-forge keras tensorflow
Hope it helps.
In case you want to train CNN's with the theano backend like the Keras mnist_cnn.py example:
You better use theano bleeding edge version. Otherwise there may occur assertion errors.
Run Theano bleeding edge
pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git
Run Keras (like 1.0.8 works fine)
pip install git+git://github.com/fchollet/keras.git
install by this command given below
conda install -c conda-forge keras
this is error "CondaError: Cannot link a source that does not exist" ive get in win 10.
for your error put this command in your command line.
conda update conda
this work for me .
In windows environment with Anconda. Go to anconda prompt from start. Then if you are behind proxy then .copndarc file needs to eb updated with the proxy details.
ssl_verify: false
channels:
- defaults
proxy_servers:
http: http://xx.xx.xx.xx:xxxx
https: https://xx.xx.xx.xx:xxxx
I had ssl_verify initially marked as 'True' then I was getting ssl error. So i turned it to false as above and then ran the below commands
conda update conda
conda update --all
conda install --channel https://conda.anaconda.org/conda-forge keras
conda install --channel https://conda.anaconda.org/conda-forge tensorflow
My python version is 3.6.7
Anaconda with Windows
Run anaconda prompt with administrator privilages
conda update conda
conda update --all
conda install mingw libpython
conda install theano
After conda commands it's required to accept process - Proceed ([y]/n)?