roban/CosmoloPy

pip install fails in Python ≥3.8

Closed this issue · 0 comments

Installing via pip install cosmolopy==0.4 fails under Python 3.8 and newer with the following error message:

    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/_v/z0wcz3kd1y5_0565c99_pqcw0000gn/T/pip-install-9gkkksqw/cosmolopy_d5ebe232f15d40c39ed797a98dc269fb/setup.py", line 51, in <module>
        with open(path.join(dirpath, 'requirements.txt'), 'r') as f:
    FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/_v/z0wcz3kd1y5_0565c99_pqcw0000gn/T/pip-install-9gkkksqw/cosmolopy_d5ebe232f15d40c39ed797a98dc269fb/requirements.txt'

After looking at PyPI, here’s what I think is happening:

  • For Python ≤3.7, there’s a pre-built wheel available, so pip will install that successfully.
  • For Python ≥3.8, since there’s no pre-built wheel, it will download the source and try to install from that. However, the source package doesn’t contain a file named requirements.txt, so this fails.