GithubHelp home page GithubHelp logo

error in import abilib about abipy HOT 7 OPEN

rajeshatiitm avatar rajeshatiitm commented on August 18, 2024
error in import abilib

from abipy.

Comments (7)

gmatteo avatar gmatteo commented on August 18, 2024

In the new version of pymatgen, SlotPickleMixin has been removed thus breaking backward compatibility.
A patch addressing the problem has been merged in #253 and will be made available in v0.9.3

For the time being, one has to install an older version of pymargen with e.g.:

pip install pymatgen==2022.9.8

See also this pymatgen issue

from abipy.

rajeshatiitm avatar rajeshatiitm commented on August 18, 2024

I have successfully installed the abipy using "pip install abipy --user".
Using ipython I can test the installation is ok like "from abipy import abilab"

However, I can not execute abiopen.py in Ubuntu terminal! it says command not found.

Could you please help me to find out what I am doing wrong?

Thanks!

from abipy.

gmatteo avatar gmatteo commented on August 18, 2024

Could you please help me to find out what I am doing wrong?

You are using conda to manage your python installation so you need to activate the conda environment where abipy has been installed with e.g.:

conda activate my_pymatgen

in order to have the python scripts in $PATH.

PS: The --user option is not needed when conda envs are used.
To install python packages in a conda env, activate the env then use

conda install abipy -c conda-forge

or

pip install abipy

from abipy.

rajeshatiitm avatar rajeshatiitm commented on August 18, 2024

I did the following:
-->conda install pymatgen==2022.9.8
-->conda create --name my_pymatgen python
-->conda activate my_pymatgen
-->conda create --name abienv python=3.10
-->conda activate abienv
-->conda config --add channels conda-forge
-->conda install abipy -c conda-forge

then I tested as before in ipython "from abipy import abilab" and it works. I can even see that abipy is installed where it says

"The following NEW packages will be installed
abipy conda-forge/noarch::abipy-0.9.2-pyhd8ed1ab_0 None"

then I executed in terminal $ abipy and it says "abipy: command not found

Any help please!

from abipy.

gmatteo avatar gmatteo commented on August 18, 2024

then I executed in terminal $ abipy and it says "abipy: command not found

Abipy is the name of the python package so it's normal that you cannot invoke it directly from the shell.
There are several scripts that can be used to post-process the data directly from the shell: abistruct.py, abiopen.py, etc.

For the full list of scripts installed by abipy see this page

from abipy.

rajeshatiitm avatar rajeshatiitm commented on August 18, 2024

Hi Gmatteo,

I can work with abilab in jupyter notbook, it works nicely, but I can not execute in terminal. I get the following error
$ abiopen.py --help
Traceback (most recent call last):
File "/home/rdutta/anaconda3/bin/abiopen.py", line 4, in
import('pkg_resources').run_script('abipy==0.9.2', 'abiopen.py')
File "/home/rdutta/anaconda3/lib/python3.9/site-packages/pkg_resources/init.py", line 662, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/home/rdutta/anaconda3/lib/python3.9/site-packages/pkg_resources/init.py", line 1447, in run_script
raise ResolutionError(
pkg_resources.ResolutionError: Script 'scripts/abiopen.py' not found in metadata at '/home/rdutta/.local/lib/python3.9/site-packages/abipy-0.9.2.dist-info'

from abipy.

rajeshatiitm avatar rajeshatiitm commented on August 18, 2024

However, I can manually copy that abiopen.py into the working directory (where I am working on example), then it works with command ./abiopen.py.

I don't know why does it not work just as $abiopen.py ?

from abipy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.