konkolyseismolab / seismolab

Open-source python framework for downloading, analyzing, and visualizing data of variable stars from space-based surveys.
https://seismolab.readthedocs.io/en/latest/index.html
MIT License
3 stars 1 forks source link

Installation issue #6

Closed keatonb closed 1 month ago

keatonb commented 1 month ago

My attempts to install seismolab with pip and by compiling the source resulted in errors related to Theano. Full output below. I am using a Mac with macOS 14.6 (Sonoma) and an Apple M3 processor. I am using Python v3.12.4 in a fresh Anaconda environment with default packages.

(seismolab) keatonb@Keatons-MacBook-Air ~ % pip install seismolab Collecting seismolab Using cached seismolab-1.1.2-py3-none-any.whl.metadata (3.0 kB) Requirement already satisfied: numpy<2.0,>=1.4.0 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from seismolab) (1.26.4) Requirement already satisfied: scipy>=1.7.0 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from seismolab) (1.13.1) Requirement already satisfied: matplotlib>=3.5 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from seismolab) (3.8.4) Requirement already satisfied: astropy>=4.1rc1 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from seismolab) (6.1.0) Requirement already satisfied: tqdm>=4.25.0 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from seismolab) (4.66.4) Collecting uncertainties (from seismolab) Using cached uncertainties-3.2.2-py3-none-any.whl.metadata (6.9 kB) Collecting corner (from seismolab) Using cached corner-2.2.2-py3-none-any.whl.metadata (2.2 kB) Requirement already satisfied: joblib in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from seismolab) (1.4.2) Requirement already satisfied: pandas>=1.3 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from seismolab) (2.2.2) Requirement already satisfied: psutil in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from seismolab) (5.9.0) Requirement already satisfied: h5py in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from seismolab) (3.11.0) Collecting ephem (from seismolab) Using cached ephem-4.1.5-cp312-cp312-macosx_11_0_arm64.whl.metadata (6.0 kB) Collecting astroquery (from seismolab) Using cached astroquery-0.4.7-py3-none-any.whl.metadata (7.2 kB) Requirement already satisfied: numpydoc in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from seismolab) (1.7.0) Collecting nbsphinx (from seismolab) Using cached nbsphinx-0.9.5-py3-none-any.whl.metadata (2.1 kB) Requirement already satisfied: statsmodels in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from seismolab) (0.14.2) Collecting pymc3 (from seismolab) Using cached pymc3-3.11.6-py3-none-any.whl.metadata (15 kB) Collecting pyvo (from seismolab) Using cached pyvo-1.5.2-py3-none-any.whl.metadata (4.7 kB) Requirement already satisfied: seaborn in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from seismolab) (0.13.2) Requirement already satisfied: regex in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from seismolab) (2023.10.3) Requirement already satisfied: requests in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from seismolab) (2.32.2) Collecting mwdust (from seismolab) Using cached mwdust-1.5.post0-cp312-cp312-macosx_11_0_arm64.whl.metadata (8.3 kB) Requirement already satisfied: pyerfa>=2.0.1.1 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from astropy>=4.1rc1->seismolab) (2.0.1.4) Requirement already satisfied: astropy-iers-data>=0.2024.4.29.0.28.48 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from astropy>=4.1rc1->seismolab) (0.2024.6.3.0.31.14) Requirement already satisfied: PyYAML>=3.13 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from astropy>=4.1rc1->seismolab) (6.0.1) Requirement already satisfied: packaging>=19.0 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from astropy>=4.1rc1->seismolab) (23.2) Requirement already satisfied: contourpy>=1.0.1 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from matplotlib>=3.5->seismolab) (1.2.0) Requirement already satisfied: cycler>=0.10 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from matplotlib>=3.5->seismolab) (0.11.0) Requirement already satisfied: fonttools>=4.22.0 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from matplotlib>=3.5->seismolab) (4.51.0) Requirement already satisfied: kiwisolver>=1.3.1 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from matplotlib>=3.5->seismolab) (1.4.4) Requirement already satisfied: pillow>=8 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from matplotlib>=3.5->seismolab) (10.3.0) Requirement already satisfied: pyparsing>=2.3.1 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from matplotlib>=3.5->seismolab) (3.0.9) Requirement already satisfied: python-dateutil>=2.7 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from matplotlib>=3.5->seismolab) (2.9.0.post0) Requirement already satisfied: pytz>=2020.1 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from pandas>=1.3->seismolab) (2024.1) Requirement already satisfied: tzdata>=2022.7 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from pandas>=1.3->seismolab) (2023.3) Requirement already satisfied: beautifulsoup4>=4.8 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from astroquery->seismolab) (4.12.3) Collecting html5lib>=0.999 (from astroquery->seismolab) Using cached html5lib-1.1-py2.py3-none-any.whl.metadata (16 kB) Requirement already satisfied: keyring>=15.0 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from astroquery->seismolab) (24.3.1) Requirement already satisfied: charset-normalizer<4,>=2 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from requests->seismolab) (2.0.4) Requirement already satisfied: idna<4,>=2.5 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from requests->seismolab) (3.7) Requirement already satisfied: urllib3<3,>=1.21.1 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from requests->seismolab) (2.2.2) Requirement already satisfied: certifi>=2017.4.17 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from requests->seismolab) (2024.6.2) Collecting healpy (from mwdust->seismolab) Using cached healpy-1.17.3-cp312-cp312-macosx_14_0_arm64.whl.metadata (8.9 kB) Requirement already satisfied: docutils>=0.18.1 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from nbsphinx->seismolab) (0.18.1) Requirement already satisfied: jinja2 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from nbsphinx->seismolab) (3.1.4) Requirement already satisfied: nbconvert!=5.4,>=5.3 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from nbsphinx->seismolab) (7.10.0) Requirement already satisfied: traitlets>=5 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from nbsphinx->seismolab) (5.14.3) Requirement already satisfied: nbformat in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from nbsphinx->seismolab) (5.9.2) Requirement already satisfied: sphinx>=1.8 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from nbsphinx->seismolab) (7.3.7) Requirement already satisfied: tabulate>=0.8.10 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from numpydoc->seismolab) (0.9.0) Collecting arviz>=0.11.0 (from pymc3->seismolab) Using cached arviz-0.20.0-py3-none-any.whl.metadata (8.8 kB) Requirement already satisfied: cachetools>=4.2.1 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from pymc3->seismolab) (5.3.3) Collecting deprecat (from pymc3->seismolab) Using cached deprecat-2.1.3-py2.py3-none-any.whl.metadata (1.6 kB) Requirement already satisfied: dill in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from pymc3->seismolab) (0.3.8) Collecting fastprogress>=0.2.0 (from pymc3->seismolab) Using cached fastprogress-1.0.3-py3-none-any.whl.metadata (5.6 kB) INFO: pip is looking at multiple versions of pymc3 to determine which version is compatible with other requirements. This could take a while. Collecting pymc3 (from seismolab) Using cached pymc3-3.11.5-py3-none-any.whl.metadata (14 kB) Using cached pymc3-3.11.4-py3-none-any.whl.metadata (14 kB) Requirement already satisfied: patsy>=0.5.1 in ./anaconda3/envs/seismolab/lib/python3.12/site-packages (from pymc3->seismolab) (0.5.6) Collecting semver>=2.13.0 (from pymc3->seismolab) Downloading semver-3.0.2-py3-none-any.whl.metadata (5.0 kB) Collecting theano-pymc==1.1.2 (from pymc3->seismolab) Using cached Theano-PyMC-1.1.2.tar.gz (1.8 MB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [18 lines of output] /private/var/folders/tw/bnyh2s050gz8kh04n3_2v1lw0000gn/T/pip-install-gpyv_w_4/theano-pymc_d22a480c2d21486c90509aea23cfec23/versioneer.py:421: SyntaxWarning: invalid escape sequence '\s' LONG_VERSION_PY['git'] = ''' Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/private/var/folders/tw/bnyh2s050gz8kh04n3_2v1lw0000gn/T/pip-install-gpyv_w_4/theano-pymc_d22a480c2d21486c90509aea23cfec23/setup.py", line 49, in version=versioneer.get_version(), ^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/tw/bnyh2s050gz8kh04n3_2v1lw0000gn/T/pip-install-gpyv_w_4/theano-pymc_d22a480c2d21486c90509aea23cfec23/versioneer.py", line 1479, in get_version return get_versions()["version"] ^^^^^^^^^^^^^^ File "/private/var/folders/tw/bnyh2s050gz8kh04n3_2v1lw0000gn/T/pip-install-gpyv_w_4/theano-pymc_d22a480c2d21486c90509aea23cfec23/versioneer.py", line 1411, in get_versions cfg = get_config_from_root(root) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/tw/bnyh2s050gz8kh04n3_2v1lw0000gn/T/pip-install-gpyv_w_4/theano-pymc_d22a480c2d21486c90509aea23cfec23/versioneer.py", line 342, in get_config_from_root parser = configparser.SafeConfigParser() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'? [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

warrickball commented 1 month ago

I can reproduce this with Python 3.12.6 on Fedora 40. I don't run into this issue with Python 3.9.5 on RHEL 8.8 so I suspect it's a Python version issue.

In particular, the Theano dependency is coming from PyMC3. It looks to me like PyMC3 has had little to no support for about two years, following what looks like Theano development ending. PyMC is now up to major version 5 (there's some history in the PyMC blog), so unless there's good reason to persist with older versions of PyMC, I'd suggest trying to upgrade seismolab to use that instead.

FWIW I just installed PyMC 5.12.0 on Python 3.9.5 and PyMC 5.17.0 on Python 3.12.6.

darthoctopus commented 1 month ago

Chiming in with success on different python versions: I've been able to install the package on python 3.10.14 and 3.11.8 (both on Arch Linux)

astrobatty commented 1 month ago

Thanks @keatonb for spotting this issue and @warrickball for the useful suggestion. I updated seismolab to use PyMC and added python 3.12 to GitHub Actions.

warrickball commented 1 month ago

I just successfully installed seismolab 1.1.4 on Python 3.12.6 / Fedora 40.

I'm also going to mention openjournals/joss-reviews#7118 to cross-reference this back to the JOSS review.

keatonb commented 1 month ago

I have also been able to install the package now. Thanks for working on this. I will close this issue.