I got an error when I tried to install scikit-learn. The environment is Ubuntu, Python 2.7 series.
I tried to pip install.
python
pip install scikit-learn
Abbreviation
ImportError: Numerical Python (NumPy) is not installed.
scikit-learn requires NumPy >= 1.6.1.
Installation instructions are available on the scikit-learn website: http://scikit-learn.org/stable/install.html
Abbreviation
I'm not familiar with numpy, so I tried to put it in with pip for the time being.
python
pip install numpy
Downloading/unpacking numpy
Downloading numpy-1.11.1.zip (4.7MB): 4.7MB downloaded
Running setup.py (path:/tmp/pip_build_vagrant/numpy/setup.py) egg_info for package numpy
Running from numpy source directory.
Abbreviation
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_vagrant/numpy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-RTxqgv-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_vagrant/numpy
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 235, in main
return command.main(cmd_args)
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 72: ordinal not in range(128)
I was told that the ascii codec cannot be decoded.
It seems that numpy should be entered with apt-get. I just wanted to put Tensorflow after this, so I put everything according to the reference site.
python-install numpy
sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose
This time it worked (☝՞ ਊ՞) ☝
http://www.elecafe.info/contents/20151116-tensorflow-trial/
Recommended Posts