Re: [Phonopy-users] install phono3py on MacOS
Brought to you by:
atztogo
|
From: Atsushi T. <atz...@gm...> - 2017-07-23 06:52:20
|
I summarize an installation process of phono3py on MacOSX here, https://atztogo.github.io/phono3py/install.html#installation-on-macosx Togo On Sun, Jul 23, 2017 at 2:22 PM, Atsushi Togo <atz...@gm...> wrote: > Hi, > > I'm sorry I will give up to help you, otherwise I have to explain from > what is UNIX. > > Togo > > On Sun, Jul 23, 2017 at 2:11 PM, Hui Wang <hu...@uc...> wrote: >> Dear Togo, >> I don’t have ipython, and my phonopy related environmental variables >> in my .bashrc file are as follows: >> ============== >> ######for bin######## >> export PATH="/opt/local/bin:/opt/local/sbin:$PATH" >> >> ######for Miniconda######## >> export PATH="/Users/Hui_DFT/Software/miniconda3/bin:$PATH" >> >> ######for python####### >> export PYTHONPATH=~/Software/phonopy-1.10.0/lib/python >> # export PYTHONPATH=~/Library/Python/2.7/lib/python/site-packages >> =============== >> I used two ways to install phonopy, one is using MacBook port based >> on the website (phonopy version 1.10.0), it work very well, >> https://atztogo.github.io/phonopy/MacOSX.html#install-macosx >> the other one is using conda based on your suggestions (phonopy >> version 1.11.12), which doesn’t work well so far. >> For phonopy 1.10.0, it has python module to load as shown above, >> however, for phonopy 1.11.12, it doesn’t have python module. >> I found when i use phonopy it always use phonopy 1.10.0, even if i >> direct set the directory path of phonopy 1.11.12 in bashrc file and source >> it. I also try to set export >> PYTHONPATH=~/Library/Python/2.7/lib/python/site-packages, and it doesn’t >> work. Do you know why this happening? Again, many thanks. >> >> Best. >> Hui >> >> On Jul 23, 2017, at 8:31 AM, Atsushi Togo <atz...@gm...> wrote: >> >> Hi, >> >> 1. Have you set PYTHON_PATH correctly? You may see it by >> >> % echo $PYTHON_PATH >> >> 2. You can check the phonopy version, e.g., using ipython, >> >> In [1]: import phonopy >> >> In [2]: phonopy.__version__ >> Out[2]: '1.11.12' >> >> 3. In my case, phono*py are installed at >> ~/.local/lib/python3.6/site-packages/. You may remove them by hand, >> % rm -fr ~/.local/lib/python3.6/site-packages/phono* >> and then reinstall them. >> >> Togo >> >> On Sun, Jul 23, 2017 at 12:27 AM, Hui Wang <hu...@uc...> wrote: >> >> Dear Togo, >> I really appreciate your help on installing phono3py. I reinstalled >> the latest phonopy and latest phono3py exactly as you suggested, and they >> have all been successfully as shown below: >> ============== >> Using >> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages >> Finished processing dependencies for phonopy==1.11.12 >> ============== >> Installed >> /Users/Hui_DFT/Library/Python/2.7/lib/python/site-packages/phono3py-1.11.13-py2.7-macosx-10.12-x86_64.egg >> Processing dependencies for phono3py==1.11.13 >> Finished processing dependencies for phono3py==1.11.13 >> ============== >> However, when i tried to test the Si_LDA in the example directory by >> using the phono3py in the script directory: >> phono3py --dim="2 2 2" --sym_fc3r --sym_fc2 --tsym -c POSCAR-unitcell >> it still failed the same as before (as follows): >> ============== >> ~/Software/Conda/phono3py/example/Si-LDA$ phono3py --dim="2 2 2" --sym_fc3r >> --sym_fc2 --tsy >> Traceback (most recent call last): >> File "/usr/local/bin/phono3py", line 42, in <module> >> from phonopy.interface import read_crystal_structure, get_force_sets >> ImportError: cannot import name get_force_sets >> ============== >> I feel sorry to bother you, but since i am new learner of phono3py, and >> have very little experience on it, so please help to see what could be the >> problem causing this error? Many many thanks. >> >> Best. >> Hui >> >> >> On Jul 22, 2017, at 10:16 PM, Atsushi Togo <atz...@gm...> wrote: >> >> Please use the combination of the latest phono3py and latest phonopy. >> I wrote the procedure. I did my best to help you. Please do your best. >> >> % git clone https://github.com/atztogo/phonopy.git >> % cd phonopy >> % python setup.py install --user >> % cd .. >> % git clone https://github.com/atztogo/phono3py.git >> % cd phono3py >> % python setup.py install --user >> % cd .. >> >> Togo >> >> On Sat, Jul 22, 2017 at 11:10 PM, Hui Wang <hu...@uc...> wrote: >> >> Thanks for you reply, Togo. It seems work with gcc, >> ============== >> Installing phono3py script to /Users/Hui_DFT/Library/Python/2.7/bin >> Installing kaccum script to /Users/Hui_DFT/Library/Python/2.7/bin >> Installing kdeplot script to /Users/Hui_DFT/Library/Python/2.7/bin >> >> Installed >> /Users/Hui_DFT/Library/Python/2.7/lib/python/site-packages/phono3py-1.11.13-py2.7-macosx-10.12-x86_64.egg >> Processing dependencies for phono3py==1.11.13 >> Finished processing dependencies for phono3py==1.11.13 >> ============== >> But, when i try to test the Si_PBE in the example by using the phono3py in >> the script directory: >> phono3py --dim="2 2 2" --sym_fc3r --sym_fc2 --tsym -c POSCAR-unitcell >> it failed as follows >> ============== >> Traceback (most recent call last): >> File "/usr/local/bin/phono3py", line 42, in <module> >> from phonopy.interface import read_crystal_structure, get_force_sets >> ImportError: cannot import name get_force_sets >> ============== >> >> Is this because my previous phonopy is out of date (version 1.10.0)? Or >> what’s the possible reason causing the error? Thanks for your help, looking >> forward to your reply. >> >> Best. >> Hui >> >> >> On Jul 22, 2017, at 9:39 PM, Atsushi Togo <atz...@gm...> wrote: >> >> How about >> >> export CC=gcc >> >> Togo >> >> On Sat, Jul 22, 2017 at 10:37 PM, Hui Wang <hu...@uc...> wrote: >> >> Dear Phonopy developer: >> Thanks for your suggestions. I installed the miniconda and wget as >> you suggest, while i failed when i try to install gcc7 as shown below, >> =============== >> ---> Computing dependencies for gcc7 >> Error: Can't install libgcc-devel because conflicting ports are active: >> libgcc >> Error: Follow https://guide.macports.org/#project.tickets to report a bug. >> Error: Processing of port gcc7 failed >> =============== >> I continue anyway to install numpy scipy h5py pyyaml matplotlib >> openblas as suggested, then I try to install phono3py by command python >> setup.py install --user, which failed as shown below, >> =============== >> copying phono3py/phonon3/reciprocal_to_normal.py -> >> build/lib.macosx-10.12-x86_64-2.7/phono3py/phonon3 >> copying phono3py/phonon3/triplets.py -> >> build/lib.macosx-10.12-x86_64-2.7/phono3py/phonon3 >> running build_ext >> building 'phono3py._lapackepy' extension >> creating build/temp.macosx-10.12-x86_64-2.7 >> creating build/temp.macosx-10.12-x86_64-2.7/c >> creating build/temp.macosx-10.12-x86_64-2.7/c/harmonic >> /usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe -Os -fwrapv >> -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ic/harmonic_h >> -Ic/anharmonic_h -Ic/spglib_h -Ic/kspclib_h >> -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include >> -I/opt/local/include >> -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >> -c c/_lapackepy.c -o build/temp.macosx-10.12-x86_64-2.7/c/_lapackepy.o >> -fopenmp >> clang: error: unsupported option '-fopenmp' >> error: command '/usr/bin/clang' failed with exit status 1 >> ================ >> It seems like MacBook’s compiler clang doesn’t support ‘-fopenmp’, >> is this because gcc7 doesn’t install successfully, is gcc7 necessary? Do you >> have any ideas on how to solve this issue, thanks a lot in advance. >> >> Best. >> Hui >> >> >> >> On Jul 21, 2017, at 5:15 PM, Atsushi Togo <atz...@gm...> wrote: >> >> Hi, >> >> One way with conda, I will explain roughly. >> >> I suppose you have this environment variable. >> export PATH=~/.miniconda3/bin:$PATH >> I also asume you have gcc compiler on your system. I install it by >> using MacPort, e.g., >> % sudo port install gcc7 >> (maybe also wget because I am familiar with it than curl.) >> % sudo port install wget >> >> Download miniconda at https://conda.io/miniconda.html. >> % wget >> https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh >> >> Install conda >> % bash miniconda.sh -b -p $HOME/.miniconda3 >> >> Package install >> % conda update conda >> % conda install numpy scipy h5py pyyaml matplotlib openblas >> >> Install phonopy and phono3py >> % git clone https://github.com/atztogo/phonopy.git >> % cd phonopy >> % python setup.py install --user >> % cd .. >> % git clone https://github.com/atztogo/phono3py.git >> % cd phono3py >> % python setup.py install --user >> % cd .. >> >> Togo >> >> On Fri, Jul 21, 2017 at 6:01 PM, Hui Wang <hu...@uc...> wrote: >> >> Dear Phonopy developer: >> I have successfully installed phonopy on my Macbook, which works >> normally. Now i want to install phono3y on my MacBook, I checked the website >> of phono3py, it said use conda or pip, or from source code. Is there any >> instructions on how to install phono3py on MacBook OS? Thanks. >> >> Best. >> Hui >> >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Phonopy-users mailing list >> Pho...@li... >> https://lists.sourceforge.net/lists/listinfo/phonopy-users >> >> >> >> >> -- >> Atsushi Togo >> Elements Strategy Initiative for Structural Materials, Kyoto university >> E-mail: atz...@gm... >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Phonopy-users mailing list >> Pho...@li... >> https://lists.sourceforge.net/lists/listinfo/phonopy-users >> >> >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Phonopy-users mailing list >> Pho...@li... >> https://lists.sourceforge.net/lists/listinfo/phonopy-users >> >> >> >> >> -- >> Atsushi Togo >> Elements Strategy Initiative for Structural Materials, Kyoto university >> E-mail: atz...@gm... >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Phonopy-users mailing list >> Pho...@li... >> https://lists.sourceforge.net/lists/listinfo/phonopy-users >> >> >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Phonopy-users mailing list >> Pho...@li... >> https://lists.sourceforge.net/lists/listinfo/phonopy-users >> >> >> >> >> -- >> Atsushi Togo >> Elements Strategy Initiative for Structural Materials, Kyoto university >> E-mail: atz...@gm... >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Phonopy-users mailing list >> Pho...@li... >> https://lists.sourceforge.net/lists/listinfo/phonopy-users >> >> >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Phonopy-users mailing list >> Pho...@li... >> https://lists.sourceforge.net/lists/listinfo/phonopy-users >> >> >> >> >> -- >> Atsushi Togo >> Elements Strategy Initiative for Structural Materials, Kyoto university >> E-mail: atz...@gm... >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Phonopy-users mailing list >> Pho...@li... >> https://lists.sourceforge.net/lists/listinfo/phonopy-users >> >> >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Phonopy-users mailing list >> Pho...@li... >> https://lists.sourceforge.net/lists/listinfo/phonopy-users >> > > > > -- > Atsushi Togo > Elements Strategy Initiative for Structural Materials, Kyoto university > E-mail: atz...@gm... -- Atsushi Togo Elements Strategy Initiative for Structural Materials, Kyoto university E-mail: atz...@gm... |