dftd3 / simple-dftd3

reimplementation of the DFT-D3 program
https://dftd3.readthedocs.io
GNU Lesser General Public License v3.0
51 stars 24 forks source link

installation by pip is broken #36

Closed GengSS closed 1 year ago

GengSS commented 1 year ago

Hi, I installed the s-DFTD3 successfully by pip using:

pip install dftd3

however, I tested the code by following the lines: python -c "from dftd3.ase import DFTD3" I got the error like this:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'dftd3.ase'; 'dftd3' is not a package

I am sure I have ASE installed because I can import ASE successfully.

Is there any idea why I got the importing error?

Thank you very much

Best, Geng

awvwgk commented 1 year ago

I could not reproduce this issue on Linux/x86_64 with Python 3.11 using the provided wheel from PyPI. Please provide more information on your setup.

GengSS commented 1 year ago

Hi, I am using an conda/python environment Here is is the installed package in the environment:

_libgcc_mutex             0.1                        main
_openmp_mutex             4.5                       1_gnu
ase                       3.22.1                   pypi_0    pypi
blas                      1.0                         mkl
ca-certificates           2022.2.1             h06a4308_0
certifi                   2021.10.8        py38h06a4308_2
cycler                    0.11.0                   pypi_0    pypi
fonttools                 4.30.0                   pypi_0    pypi
gpaw                      22.8.1b1                 pypi_0    pypi
intel-openmp              2021.4.0          h06a4308_3561
kiwisolver                1.4.0                    pypi_0    pypi
ld_impl_linux-64          2.35.1               h7274673_9
libffi                    3.3                  he6710b0_2
libgcc-ng                 9.3.0               h5101ec6_17
libgfortran-ng            7.5.0               ha8ba4b0_17
libgfortran4              7.5.0               ha8ba4b0_17
libgomp                   9.3.0               h5101ec6_17
libstdcxx-ng              9.3.0               hd4cf53a_17
matplotlib                3.5.1                    pypi_0    pypi
mkl                       2021.4.0           h06a4308_640
mkl-service               2.4.0            py38h7f8727e_0
mkl_fft                   1.3.1            py38hd3c417c_0
mkl_random                1.2.2            py38h51133e4_0
ncurses                   6.3                  h7f8727e_2
numpy                     1.21.2           py38h20f2e39_0
numpy-base                1.21.2           py38h79a1101_0
openssl                   1.1.1m               h7f8727e_0
packaging                 21.3                     pypi_0    pypi
pillow                    9.0.1                    pypi_0    pypi
pip                       21.2.4           py38h06a4308_0
pyparsing                 3.0.7                    pypi_0    pypi
python                    3.8.12               h12debd9_0
python-dateutil           2.8.2                    pypi_0    pypi
pyyaml                    6.0                      pypi_0    pypi
readline                  8.1.2                h7f8727e_1
scipy                     1.7.3            py38hc147768_0
setuptools                58.0.4           py38h06a4308_0
six                       1.16.0             pyhd3eb1b0_1
sqlite                    3.38.0               hc218d9a_0
tk                        8.6.11               h1ccaba5_0
wheel                     0.37.1             pyhd3eb1b0_0
xz                        5.2.5                h7b6447c_0
zlib                      1.2.11               h7f8727e_4

and here is the output of conda info

     active environment : /u/project/sautet/gengsun/programs/conda-envs/gpaw_spinful
    active env location : /u/project/sautet/gengsun/programs/conda-envs/gpaw_spinful
            shell level : 2
       user config file : /u/home/g/gengsun/.condarc
 populated config files : /u/home/g/gengsun/.condarc
          conda version : 4.11.0
    conda-build version : 3.21.4
         python version : 3.8.8.final.0
       virtual packages : __linux=3.10.0=0
                          __glibc=2.17=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /u/home/g/gengsun/anaconda3  (writable)
      conda av data dir : /u/home/g/gengsun/anaconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /u/home/g/gengsun/anaconda3/pkgs
                          /u/home/g/gengsun/.conda/pkgs
       envs directories : /u/home/g/gengsun/anaconda3/envs
                          /u/home/g/gengsun/.conda/envs
               platform : linux-64
             user-agent : conda/4.11.0 requests/2.25.1 CPython/3.8.8 Linux/3.10.0-1160.80.1.el7.x86_64 centos/7.9.2009 glibc/2.17
                UID:GID : 12655:12574
             netrc file : None
           offline mode : False
awvwgk commented 1 year ago

This is the environment after pip install dftd3? I just tested it using a fresh conda env and could use dftd3, so maybe the wrong pip was used und it ended up in a different env? You can also install it from conda-forge as alternativ using conda install dftd3-python -c conda-forge.

awvwgk commented 1 year ago

Closing this issue as stale.