||
关注:
1) 有些软件的安装需时刻掌握,有时服务器不一定能提供你所需的软件服务
2) 从软件安装看软件运行过程
在Ubuntu下安装更容易进行
http://atztogo.github.io/phonopy/
摘录学习:
Linux下安装Phonopy
http://blog.sina.com.cn/s/blog_86e874d30102vvdd.html
下面是安装步骤:
1. Install python
https://www.python.org/downloads/
https://sourceforge.net/projects/matplotlib/?source=typ_redirect
export PYTHONPATH=$HOME/USERPATH/Python-2.7.8
export PATH=/db/home/yexq/software/gnuplot465/bin:/db/home/yexq/software/Python-3.6.0/bin:/db/home/yexq/software/vtstscripts-898:$PATH
2. Install Numpy
https://pypi.python.org/pypi/numpy/1.8.2
https://sourceforge.net/projects/numpy/postdownload?source=dlp
https://sourceforge.net/projects/numpy/?source=typ_redirect
3. Install Matplotlib
http://matplotlib.org/downloads.html
https://sourceforge.net/projects/matplotlib/?source=typ_redirect
c) it will automatically download distribute-0.6.28.tar.gz, if it's unable to download, we can download manually and put it in the folder.
PS:依赖包很多,且很多均不能自动下载,需要手动下载。
4. Install lxml
https://pypi.python.org/pypi/lxml/3.4.3
PS:安装成功后显示:Installed /db/home/yexq/software/Python-3.6.0/lib/python3.6/site-packages/lxml-3.4.1-py3.6-linux-x86_64.egg
Processing dependencies for lxml==3.4.1
Finished processing dependencies for lxml==3.4.1
5. Install PyYAML
http://www.pyyaml.org/download/pyyaml/
b) python2.7 setup.py install
PS:安装成功后显示 Writing /db/home/yexq/software/Python-3.6.0/lib/python3.6/site-packages/PyYAML-3.11-py3.6.egg-info
6. Install Phonopy
https://atztogo.github.io/phonopy/
https://sourceforge.net/projects/phonopy/files/latest/download
a) download phonopy-1.9.2-rc5.tar.gz, unzip it and change to the folder
b) python2.7 setup.py install --home=/home/user/USERPATH/phonopy
PS: python3.6 setup.py install --home=/db/home/yexq/software/phonopy184
phonopy184为新建的一目录,安装成功后显示
running install_egg_info
Writing /db/home/yexq/software/phonopy184/lib/python/phonopy-1.8.4-py3.6.e
错误收集:
Python-2.6
http://blog.csdn.net/njuitjf/article/details/6566902
Failed to find the necessary bits to build these modules:
_curses _curses_panel _hashlib
_sqlite3 _ssl _tkinter
bsddb185 dl imageop
readline sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
大致原因如下:
This is not related to PEP 3149 failures. Ubuntu 11.04 introduced multiarch
directories for the underlying shared libraries used to link to the Python
extension modules. Unpatched, Python's setup.py does not add the necessary
multiarch directories to the search paths, so some extensions won't build.
Ubuntu 11.04's Python packages have been patched to add the correct search
paths. Upstream Python 2.7, 3.1, 3.2, and 3.3 have also been patched to
include the correct search paths, but fixed versions have not been released
upstream yet. Python 2.6 won't be patched.
See issue 11715 for details.
找到了病根,也就好对症下药。拿Python-2.7.2试试,果然OK。
官网解读:
http://atztogo.github.io/phonopy/install.html
The procedure to setup phonopy is explained in this section. It is supposed that phonopy is installed on the recent linux distribution like Ubuntu or Fedora with Python version 2.6 or later. Python version 3.4 or later is expected to work.
Mac OS X users may find some more information at Using phonopy on Mac OS X.
The most recommended system is Ubuntu linux version 14.04 or later. If you have any installation problem that you may feel difficult to solve, please use a ubuntu virtual machine (see Set up Ubuntu linux on VirtualBox).
Prepare the following Python libraries:
Python and its header files
numpy
matplotlib
python-yaml (pyyaml)
python-h5py (h5py)
In Ubuntu linux, they are installed by:
python-scipy is also required to use phonopy-qha or DEBYE_MODEL tag.
The python libraries are also possible to be installed using pip or conda.
The texlive-fonts-recommended package may be required, if you see the following message in ploting results:
Occasionally PyPI and conda packages are prepared at phonopy releases. Using these packages, the phonopy installtion is expected to be easily done.
Numpy is required before the python-spglib installation. The command to install spglib is:
If you see the error message like below in the installation process:
development tools for building python module are additionally necessary and are installed using OS’s package management system, e.g.,:
Conda is another choice for Linux (64bit) users:
Currently conda packages for the other OS, e.g., Mac and windows, are not prepared by the main developers of phonopy.
If package installation is not possible or you want to compile with special compiler or special options, phonopy is built using setup.py. In this case, manual modification of setup.py may be needed.
Download the source code at
https://pypi.python.org/pypi/phonopy
and extract it:
Set up C-libraries for python C-API and python codes. This can be done as follows:
Run setup.py script:
where <my-directory> may be your current directory, .. Another choice may be to use the user scheme (see the python document):
The executable command phonopy is located in the bin directory.
Put lib/python path into $PYTHONPATH, e.g., in your .bashrc, .zshenv, etc. If it is installed under your current directory, the path to be added to $PYTHONPATH is such as below:
http://blog.csdn.net/npy_lp/article/details/42080553
在Ubuntu操作系统中,使用apt-get命令安装所需的开发软件非常方便,但也有不少时候由于链接不上软件源而不能正常安装,于是很多人都会想到使用sudo apt-get update命令来更新软件源,而恰恰这时屋漏偏逢连夜雨,更新命令也不能正常工作,出现大量“Failed to fetch”的错误。
其实,解决这个问题十分简单,只要设置妥当DNS服务器即可,如电信网络的设置如下所示。
再次执行sudo apt-get update命令,结果一切正常。
在Ubuntu下安装
http://atztogo.github.io/phonopy/install.html#id6
If package installation is not possible or you want to compile with special compiler or special options, phonopy is built using setup.py. In this case, manual modification ofsetup.py may be needed.
Download the source code at
https://pypi.python.org/pypi/phonopy
and extract it:
Set up C-libraries for python C-API and python codes. This can be done as follows:
Run setup.py script:
where <my-directory> may be your current directory, .. Another choice may be to use the user scheme (see the python document):
The executable command phonopy is located in the bin directory.
Put lib/python path into $PYTHONPATH, e.g., in your .bashrc, .zshenv, etc. If it is installed under your current directory, the path to be added to $PYTHONPATH is such as below:
执行
pythonsetup.pyinstall--user安装成功后,显示....
Installing phonopy script to /home/xiaoqiu/.local/bin
Installing phonopy-qha script to /home/xiaoqiu/.local/bin
Installing gruneisen script to /home/xiaoqiu/.local/bin
Installing outcar-born script to /home/xiaoqiu/.local/bin
Installing dispmanager script to /home/xiaoqiu/.local/bin
Installing propplot script to /home/xiaoqiu/.local/bin
Installed /home/xiaoqiu/.local/lib/python2.7/site-packages/phonopy-1.11.8-py2.7-linux-x86_64.egg 【egg什么意思】
Processing dependencies for phonopy==1.11.8
Searching for h5py==2.6.0
Best match: h5py 2.6.0
Adding h5py 2.6.0 to easy-install.pth file
Using /usr/lib/python2.7/dist-packages
Searching for matplotlib==1.5.1
Best match: matplotlib 1.5.1
matplotlib 1.5.1 is already the active version in easy-install.pth
Using /usr/lib/python2.7/dist-packages
Searching for PyYAML==3.11
Best match: PyYAML 3.11
PyYAML 3.11 is already the active version in easy-install.pth
Using /usr/lib/python2.7/dist-packages
Searching for numpy==1.11.0
Best match: numpy 1.11.0
numpy 1.11.0 is already the active version in easy-install.pth
Using /usr/lib/python2.7/dist-packages
Finished processing dependencies for phonopy==1.11.8
export PYTHONPATH=~/phonopy-1.11.2/lib/python
export PYTHONPATH=/home/xiaoqiu/Downloads/phonopy-1.11.8/lib/python
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-26 20:25
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社