ftherrien / p2ptrans

An algorithm to match crystal structures atom-to-atom
http://p2ptrans.rtfd.io
51 stars 8 forks source link

Pip installation error #6

Closed Ash-Pera closed 4 years ago

Ash-Pera commented 4 years ago

Attempting to install an Wendian in Pylada environment:


  Cloning https://github.com/ftherrien/p2ptrans to /tmp/pip-req-build-4ej3jatk
  Running command git clone -q https://github.com/ftherrien/p2ptrans /tmp/pip-req-build-4ej3jatk
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
    ERROR: Command errored out with exit status 1:
     command: /beegfs/sets/mbd/software/pylada_env/bin/python /beegfs/sets/mbd/software/pylada_env/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp3bpi2ui9
         cwd: /tmp/pip-req-build-4ej3jatk
    Complete output (102 lines):
    running dist_info
    creating /tmp/pip-modern-metadata-ztz9jm82/UNKNOWN.egg-info
    writing /tmp/pip-modern-metadata-ztz9jm82/UNKNOWN.egg-info/PKG-INFO
    writing dependency_links to /tmp/pip-modern-metadata-ztz9jm82/UNKNOWN.egg-info/dependency_links.txt
    writing top-level names to /tmp/pip-modern-metadata-ztz9jm82/UNKNOWN.egg-info/top_level.txt
    writing manifest file '/tmp/pip-modern-metadata-ztz9jm82/UNKNOWN.egg-info/SOURCES.txt'
    reading manifest file '/tmp/pip-modern-metadata-ztz9jm82/UNKNOWN.egg-info/SOURCES.txt'
    writing manifest file '/tmp/pip-modern-metadata-ztz9jm82/UNKNOWN.egg-info/SOURCES.txt'
    creating '/tmp/pip-modern-metadata-ztz9jm82/UNKNOWN.dist-info'
    running dist_info
    running build_src
    build_src
    building extension "p2ptrans.fmodules" sources
    f2py options: ['only:', 'sphere', 'parallelepiped', 'circle', 'center', 'fastoptimization', 'munkres', ':']
    f2py:> build/src.linux-x86_64-3.6/p2ptrans/fmodulesmodule.c
    creating build
    creating build/src.linux-x86_64-3.6
    creating build/src.linux-x86_64-3.6/p2ptrans
    Reading fortran codes...
        Reading file 'source/lap.f90' (format:free)
        Reading file 'source/tiling.f90' (format:free)
        Reading file 'source/transform.f90' (format:free)
    Post-processing...
        Block: fmodules
                        Block: hungarian
                                Block: munkres
                        Block: tiling
                                Block: parallelepiped
                                Block: sphere
    In: :fmodules:source/tiling.f90:tiling:sphere
    get_parameters: got "invalid syntax (<string>, line 1)" on '3.141592653589793d+0'
                                Block: circle
    In: :fmodules:source/tiling.f90:tiling:circle
    get_parameters: got "invalid syntax (<string>, line 1)" on '3.141592653589793d+0'
                        Block: transform
    In: :fmodules:source/transform.f90:transform
    get_parameters: got "unexpected EOF while parsing (<string>, line 1)" on '3.141592653589793d0'
                                Block: center
                                Block: fastoptimization
    In: :fmodules:source/transform.f90:transform:fastoptimization
    get_parameters: got "unexpected EOF while parsing (<string>, line 1)" on '3.141592653589793d0'
    Post-processing (stage 2)...
        Block: fmodules
                Block: unknown_interface
                        Block: hungarian
                                Block: munkres
                        Block: tiling
                                Block: parallelepiped
                                Block: sphere
                                Block: circle
                        Block: transform
                                Block: center
                                Block: fastoptimization
    Building modules...
        Building module "fmodules"...
                Constructing F90 module support for "hungarian"...
                        Constructing wrapper function "hungarian.munkres"...
                          sumsol,jsol = munkres(c,[n])
                Constructing F90 module support for "tiling"...
                        Constructing wrapper function "tiling.parallelepiped"...
                          asc = parallelepiped(acell,nx,ny,nz)
                        Constructing wrapper function "tiling.sphere"...
                          asc = sphere(acell,ncell,center)
                        Constructing wrapper function "tiling.circle"...
                          asc = circle(acell,ncell)
                Constructing F90 module support for "transform"...
                        Constructing wrapper function "transform.center"...
                          center(pos,[n])
                        Constructing wrapper function "transform.fastoptimization"...
                          apos_out,bpos_out,bpos_out_stretch,n_out,n_a,classes_list_out,tmat,dmin,vec = fastoptimization(apos,bpos,acell,iacell,ratio,atoms,filename,outdir,[na,nb,n_atoms])
        Wrote C/API module "fmodules" to file "build/src.linux-x86_64-3.6/p2ptrans/fmodulesmodule.c"
        Fortran 90 wrappers are saved to "build/src.linux-x86_64-3.6/p2ptrans/fmodules-f2pywrappers2.f90"
      adding 'build/src.linux-x86_64-3.6/build/src.linux-x86_64-3.6/p2ptrans/fortranobject.c' to sources.
      adding 'build/src.linux-x86_64-3.6/build/src.linux-x86_64-3.6/p2ptrans' to include_dirs.
    creating build/src.linux-x86_64-3.6/build
    creating build/src.linux-x86_64-3.6/build/src.linux-x86_64-3.6
    creating build/src.linux-x86_64-3.6/build/src.linux-x86_64-3.6/p2ptrans
    copying /tmp/pip-build-env-20929kbk/overlay/lib/python3.6/site-packages/numpy/f2py/src/fortranobject.c -> build/src.linux-x86_64-3.6/build/src.linux-x86_64-3.6/p2ptrans
    copying /tmp/pip-build-env-20929kbk/overlay/lib/python3.6/site-packages/numpy/f2py/src/fortranobject.h -> build/src.linux-x86_64-3.6/build/src.linux-x86_64-3.6/p2ptrans
      adding 'build/src.linux-x86_64-3.6/p2ptrans/fmodules-f2pywrappers2.f90' to sources.
    build_src: building npy-pkg config files
    creating /tmp/pip-modern-metadata-ztz9jm82/p2ptrans.egg-info
    writing /tmp/pip-modern-metadata-ztz9jm82/p2ptrans.egg-info/PKG-INFO
    writing dependency_links to /tmp/pip-modern-metadata-ztz9jm82/p2ptrans.egg-info/dependency_links.txt
    writing requirements to /tmp/pip-modern-metadata-ztz9jm82/p2ptrans.egg-info/requires.txt
    writing top-level names to /tmp/pip-modern-metadata-ztz9jm82/p2ptrans.egg-info/top_level.txt
    writing manifest file '/tmp/pip-modern-metadata-ztz9jm82/p2ptrans.egg-info/SOURCES.txt'
    reading manifest file '/tmp/pip-modern-metadata-ztz9jm82/p2ptrans.egg-info/SOURCES.txt'
    writing manifest file '/tmp/pip-modern-metadata-ztz9jm82/p2ptrans.egg-info/SOURCES.txt'
    creating '/tmp/pip-modern-metadata-ztz9jm82/p2ptrans.dist-info'
    rmbadname1: Replacing "char" with "char_bn".
    rmbadname1: Replacing "char" with "char_bn".
    Traceback (most recent call last):
      File "/beegfs/sets/mbd/software/pylada_env/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 257, in <module>
        main()
      File "/beegfs/sets/mbd/software/pylada_env/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 240, in main
        json_out['return_val'] = hook(**hook_input['kwargs'])
      File "/beegfs/sets/mbd/software/pylada_env/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 110, in prepare_metadata_for_build_wheel
        return hook(metadata_directory, config_settings)
      File "/tmp/pip-build-env-20929kbk/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 174, in prepare_metadata_for_build_wheel
        assert len(dist_infos) == 1
    AssertionError
    ----------------------------------------
ERROR: Command errored out with exit status 1: /beegfs/sets/mbd/software/pylada_env/bin/python /beegfs/sets/mbd/software/pylada_env/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp3bpi2ui9 Check the logs for full command output. ```
Ash-Pera commented 4 years ago

Possibly related to https://github.com/pypa/setuptools/issues/1768 , setup has no if __name__ == '__main__': entry point

ftherrien commented 4 years ago

What version of pip are you using? (pip --version) Could you also show which python and module list?

I was able to install it successfully from scratch on Wendian with:

module load apps/python3/3.7-anaconda-2018.12
module load utility/standard/cmake/3.16.2
python3 -m venv p3env
source p3env/bin/activate
pip install --upgrade pip
CXXFLAGS="-std=c++11" pip install git+https://github.com/ftherrien/p2ptrans

Loading the cmake module and the CXXFLAGS variable are for installing pylada. If you already have pylada installed you shouldn't need those.

Ash-Pera commented 4 years ago

Permissions issue.