Install the following Python package
Matplotlib (1.3.1) networkx (1.10) numpy (1.8.2) pip (1.5.4) Scikit-learn (0.16.1) scipy (0.13.3) setuptools (3.3)
Execute the following command in turn
sudo apt-get install build-essential python-dev python-setuptools python-numpy python-scipy libatlas-dev libatlas3-base sudo apt-get install python-matplotlibsudo apt-get Install Python-pip
Install Scikit-learn error message
[email protected]:~# pip install -u scikit-learn downloading/unpacking scikit-learn downloading scikit-learn-0.16.1.tar.gz (7.3MB): 6.8mb Downloadedcleaning up ... exception:traceback (most recent call last): file "/usr/lib/python2.7/ dist-packages/pip/basecommand.py ", line 122, in main status = self.run (Options, args) File "/usr/lib/python2.7/dist-packages/pip/commands/ Install.py ", line 278, in run requirement_set.prepare_files (Finder, force_root_egg_info=self.bundle, bundle=self.bundle) File "/usr/lib/python2.7/ Dist-packages/pip/req.py ", line 1198, in prepare_files do_download, File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1376, in unpack_ url self.session, file "/usr/lib/python2.7/dist-packages/pip/download.py", line 572, in unpack_http_url download_hash = _download_url (RESP, link, temp_location) File "/usr/lib/python2.7/dist-packages/pip/download.py", Line 433, in _download_url for chunk in resp_read (4096): File "/usr/lib/python2.7/dist-packages/pip/download.py", line 421, in Resp_read chunk_size, decode_content=false): file "/usr/share/ python-wheels/urllib3-1.7.1-py2.py3-none-any.whl/urllib3/response.py ", line 225, in stream data = self.read (amt=amt, decode_content=decode_content) file "/usr/share/python-wheels/urllib3-1.7.1-py2.py3-none-any.whl/urllib3/response.py", line 174, in read&nbsP; data = self._fp.read (AMT) File "/usr/lib/python2.7/httplib.py", line 573, in read s = self.fp.read (AMT) File "/usr/lib/python2.7/socket.py", line 380, in read data = self._sock.recv (left) File "/usr/lib/python2.7/ssl.py", line 341, in recv return self.read (Buflen) File "/usr/lib/python2.7/ Ssl.py ", line 260, in read return self._sslobj.read (len) sslerror: the read operation timed outstoring debug log for Failure in /root/.pip/pip.log
The main reason for this problem is that the download module timed out, even after the VPN, using
[Email protected]:~# pip Install-u Scikit-learn
No problem
Successfully installed scikit-learncleaning up ...
Other workarounds see: http://www.xuebuyuan.com/1157602.html
Installing NETWORKX
wget https://pypi.python.org/packages/source/n/networkx/networkx-1.10.tar.gz#md5= EB7A065E37250A4CC009919DACFE7A9DCD Networkx-1.10python setup.py Install
Test it:
[Email protected]:~/networkx-1.10# pip listmatplotlib (1.3.1) networkx (1.10) numpy (1.8.2) pip (1.5.4) Scikit-learn ( 0.16.1) scipy (0.13.3) setuptools (3.3)
done!
This article from "Adela" blog, declined reprint!
Machine Learning Python environment settings