Skip to content

Installation issues #23

@dandavies99

Description

@dandavies99

Part of JOSS review and related to #22 and #20.

Installation instructions should probably be reviewed. At the moment there are a few interrelated problems:

  • pip install surfinpy results in a successful installation, but python setup.py test fails due to no module named 'yaml'. Suggest that pyyaml needs adding to install_requires and on the version on PyPI.

  • The alternative install instructions (pip install -r requirements.txt etc.) don't work on a mac (at least not on my machine - osx 11.5.1 with xcode 13.2.1). This is because of a gcc error (see below) that comes from trying to install pymatgen==2020.1.28. There have been similar issues around this before. My suggestion would be to pin to a more recent version of pymatgen in requirements.txt. Alternatively, set pymatgen>=2020.1.28 and numpy>=1.17.2 if possible.

gcc: error: unrecognized command-line option '-stdlib=libc++'
error: command 'gcc' failed with exit status 1
  • Again, relating to pymatgen, the package is not actually compatible with python=3.5+ as it says in the README due to pymatgen==2020.1.28 requirement (see below). Suggest change to python 3.6+ and adding python_requires='>=3.6', to setup() in setup.py.
Could not find a version that satisfies the requirement pymatgen==2020.1.28
  • In general, if specific versions of every dependency are pinned in requirements.txt, it might be good to add in the README that it is recommended to create a new (conda) environment for this library. Otherwise, the chances of this installing nicely in the same environment of other packages that use matplotlib, numpy, pymatgen etc. are quite low.

  • The local install instructions could probably be simplified. pip install -r requirements.txt -e . will install the package in the current directory using pip so you get the advantage of pip knowing about it and it's dependencies. -e is optional and installs in "editable mode" so any changes made to the code base are applied immediately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions