install errors in yambopy

Post here any question you encounter when running the scripts of the yambo-py suite. Post here problem strictly to the python interface as problem coming from the yambo runs should go in the appropriate subforum.

Moderators: amolina, miranda.henrique, mbonacci, palful

Post Reply
shan dong
Posts: 20
Joined: Thu Oct 17, 2019 5:26 am

install errors in yambopy

Post by shan dong » Mon Jan 04, 2021 8:51 am

Dear developers:
I have typed 'conda create --name yambopy python=3.7 scipy matplotlib netcdf4 matplotlib' to create the proper environment and then 'python setup.py install' to install the yambopy.But when I typed 'yambopy',There were some errors here:
(yambopy) [ycli@a01 yambopy-master]$ yambopy
Traceback (most recent call last):
File "/home/ycli/anaconda3/bin/yambopy", line 4, in <module>
__import__('pkg_resources').run_script('yambopy==0.1', 'yambopy')
File "/home/ycli/anaconda3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3241, in <module>
@_call_aside
File "/home/ycli/anaconda3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3225, in _call_aside
f(*args, **kwargs)
File "/home/ycli/anaconda3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3254, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/home/ycli/anaconda3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
ws.require(__requires__)
File "/home/ycli/anaconda3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/home/ycli/anaconda3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'netCDF4' distribution was not found and is required by yambopy


How can I fix this problem? Thanks for your help.
Shan Dong
PhD student
Beijing Institute of Technology,China

User avatar
palful
Posts: 4
Joined: Tue Jan 26, 2016 11:23 am
Location: Rome and Milan

Re: install errors in yambopy

Post by palful » Mon Jan 04, 2021 1:34 pm

Dear Shan Dong,

It is possible that you don't have the python netCDF library installed.

Try typing

Code: Select all

 conda install netCDF4 
And then re-run the setup. Since you're at it, try also to check if the other required python modules mentioned in the installation instructions are present!

Let us know if it worked.

Cheers,
Fulvio
Fulvio Paleari
Istituto di Struttura della Materia (CNR)
Area della Ricerca Roma 1

shan dong
Posts: 20
Joined: Thu Oct 17, 2019 5:26 am

Re: install errors in yambopy

Post by shan dong » Mon Jan 04, 2021 2:15 pm

Dear Fulvio,
These errors have been solved by typing'conda install abipy --channel abinit'



Thanks,
Shan Dong
PhD student
Beijing Institute of Technology,China

Post Reply