Reprint: Original Address http://www.cnblogs.com/lxmhhy/p/6029465.html
The recent comparison of a series of data, need to use the NumPy and pandas to calculate, but use Python installation numpy and pandas because the Linux environment has encountered a lot of problems on the network is written down. first, the Python version must be above 2.7.
Linux installs the dependency package first
Yum-y Install Blas blas-devel lapack-devel lapackyum-y install seaborn scipyyum-y install FreeType freetype-devel LIBPN G libpng-develyum-y Install python-pipyum-y install Pytz
Yum-y Install Python-dateutil
Windows installation Pip, specific methods to refer to the PIP official website http://pip-cn.readthedocs.io/en/latest/installing.html
1, pip mode installation
PIP installation is generally recommended if you have an extranet and can be installed under Linux and under Windows
python-m pip install--upgrade pippip install--user numpy scipy matplotlib jupyter pandas SymPy Nose
But soon it will be found that these source installations are super slow, so I recommend that you use the source of the watercress
Pip install matplotlib-i http://pypi.douban.com/simple--trusted-host pypi.douban.compip install numpy-i/http Pypi.douban.com/simple--trusted-host pypi.douban.compip Install pandas-i http://pypi.douban.com/simple-- Trusted-host Pypi.douban.compip Install Seaborn scipy-i http://pypi.douban.com/simple--trusted-host Pypi.douban.com
2, if the server does not use the external network PIP, you need to use the source code installation. Recommended everyone in the watercress pypi download, faster https://pypi.doubanio.com/simple/?allow_list_dir=1
The Python numpy installation package is Https://pypi.python.org/pypi/numpy/,pandas the installation package is Https://pypi.python.org/pypi/pandas,github address is Https://github.com/pandas-dev
TAR-XZF numpy-1.11.2.tar.gzcd Numpy-1.11.2python setup.py build # Compile for a few minutes python setup.py install
If you are prompted for missing setuptools, download the Setuptools installation from Https://pypi.python.org/pypi/setuptools.
Installing pandas will prompt importerror:building pandas requires Cython to install Cython or upgrade Cython first, download link https://pypi.python.org/pypi/Cython/. Under Windows PIP installation is as follows
Pip Install Cython
Yum installation or PIP installation can be used under Linux
Yum Install-y cython.x86_64
If you need to update to the latest version of the Cython download the source after the installation
CD Cython-0.25.1python setup.py buildpython setup.py Install
Then follow the pandas
CD Pandas-0.19.0python setup.py build # More long python setup.py install
If you encounter a hint that you need to install Python-dateutil, the library version is too low. Download the latest version of 1.9.0 () and update the Python-dateutil to the new version 2.5.3 version ().
Last run if a/usr/lib64/libstdc++.so.6:elf file OS ABI Invalid error occurs, the/usr/lib64/libstdc++.so.6 soft chain is directed to the lower version of Libstdc++. so.6.0.8, do not point to high version libstdc++.so.6.0.20.
The installation is now successful.
Summary, spent the morning installing this mainly because the download source is slow and depends on the package more. So it is recommended that we all use pypi watercress source, directly under simple search you need to install the package.
"Reprint" Python installs NumPy and pandas