spacetelescope / ullyses

Code to create products for the ULLYSES program
https://ullyses.stsci.edu/
BSD 3-Clause "New" or "Revised" License
2 stars 6 forks source link

Installation issue #50

Open mdecleir opened 1 year ago

mdecleir commented 1 year ago

I tried to install the code following the instructions in the README, but I ran into the following issue: error: The 'calcos>=3.4.0' distribution was not found and is required by ullyses

The README says all dependencies will be installed automatically. What should I do?

tapastro commented 1 year ago

calcos is hosted on PyPI and should be fetchable during installation. Can you provide the complete installation log to see what happened when it attempted to pull calcos?

mdecleir commented 1 year ago

python setup.py install running install /Users/mdecleir/opt/anaconda3/envs/depletions/lib/python3.11/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. !!

    ********************************************************************************
    Please avoid running ``setup.py`` directly.
    Instead, use pypa/build, pypa/installer or other
    standards-based tools.

    See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
    ********************************************************************************

!! self.initialize_options() /Users/mdecleir/opt/anaconda3/envs/depletions/lib/python3.11/site-packages/setuptools/_distutils/cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated. !!

    ********************************************************************************
    Please avoid running ``setup.py`` and ``easy_install``.
    Instead, use pypa/build, pypa/installer or other
    standards-based tools.

    See https://github.com/pypa/setuptools/issues/917 for details.
    ********************************************************************************

!! self.initialize_options() running bdist_egg running egg_info creating ullyses.egg-info writing ullyses.egg-info/PKG-INFO writing dependency_links to ullyses.egg-info/dependency_links.txt writing requirements to ullyses.egg-info/requires.txt writing top-level names to ullyses.egg-info/top_level.txt writing manifest file 'ullyses.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'ullyses.egg-info/SOURCES.txt' installing library code to build/bdist.macosx-10.9-x86_64/egg running install_lib running build_py creating build creating build/lib creating build/lib/ullyses copying ullyses/calibrate_stis_data.py -> build/lib/ullyses copying ullyses/make_flagged_fuse.py -> build/lib/ullyses copying ullyses/fuse_add_dq.py -> build/lib/ullyses copying ullyses/create_ullyses_hlsp.py -> build/lib/ullyses copying ullyses/lcogt_hlsps_wrapper.py -> build/lib/ullyses copying ullyses/wrapper.py -> build/lib/ullyses copying ullyses/ctts_cal.py -> build/lib/ullyses copying ullyses/plot_stis_data.py -> build/lib/ullyses copying ullyses/init.py -> build/lib/ullyses copying ullyses/splittag_wrapper.py -> build/lib/ullyses copying ullyses/coadd.py -> build/lib/ullyses copying ullyses/ullyses_hlsp.py -> build/lib/ullyses copying ullyses/flag_vignetting.py -> build/lib/ullyses copying ullyses/make_stis_x1ds.py -> build/lib/ullyses copying ullyses/apply_cos_shifts.py -> build/lib/ullyses copying ullyses/imaging_hlsps_wrapper.py -> build/lib/ullyses copying ullyses/stis_coadd_x1d.py -> build/lib/ullyses copying ullyses/timeseries.py -> build/lib/ullyses creating build/bdist.macosx-10.9-x86_64 creating build/bdist.macosx-10.9-x86_64/egg creating build/bdist.macosx-10.9-x86_64/egg/ullyses copying build/lib/ullyses/calibrate_stis_data.py -> build/bdist.macosx-10.9-x86_64/egg/ullyses copying build/lib/ullyses/make_flagged_fuse.py -> build/bdist.macosx-10.9-x86_64/egg/ullyses copying build/lib/ullyses/fuse_add_dq.py -> build/bdist.macosx-10.9-x86_64/egg/ullyses copying build/lib/ullyses/create_ullyses_hlsp.py -> build/bdist.macosx-10.9-x86_64/egg/ullyses copying build/lib/ullyses/lcogt_hlsps_wrapper.py -> build/bdist.macosx-10.9-x86_64/egg/ullyses copying build/lib/ullyses/wrapper.py -> build/bdist.macosx-10.9-x86_64/egg/ullyses copying build/lib/ullyses/ctts_cal.py -> build/bdist.macosx-10.9-x86_64/egg/ullyses copying build/lib/ullyses/plot_stis_data.py -> build/bdist.macosx-10.9-x86_64/egg/ullyses copying build/lib/ullyses/init.py -> build/bdist.macosx-10.9-x86_64/egg/ullyses copying build/lib/ullyses/splittag_wrapper.py -> build/bdist.macosx-10.9-x86_64/egg/ullyses copying build/lib/ullyses/coadd.py -> build/bdist.macosx-10.9-x86_64/egg/ullyses copying build/lib/ullyses/ullyses_hlsp.py -> build/bdist.macosx-10.9-x86_64/egg/ullyses copying build/lib/ullyses/flag_vignetting.py -> build/bdist.macosx-10.9-x86_64/egg/ullyses copying build/lib/ullyses/make_stis_x1ds.py -> build/bdist.macosx-10.9-x86_64/egg/ullyses copying build/lib/ullyses/apply_cos_shifts.py -> build/bdist.macosx-10.9-x86_64/egg/ullyses copying build/lib/ullyses/imaging_hlsps_wrapper.py -> build/bdist.macosx-10.9-x86_64/egg/ullyses copying build/lib/ullyses/stis_coadd_x1d.py -> build/bdist.macosx-10.9-x86_64/egg/ullyses copying build/lib/ullyses/timeseries.py -> build/bdist.macosx-10.9-x86_64/egg/ullyses byte-compiling build/bdist.macosx-10.9-x86_64/egg/ullyses/calibrate_stis_data.py to calibrate_stis_data.cpython-311.pyc byte-compiling build/bdist.macosx-10.9-x86_64/egg/ullyses/make_flagged_fuse.py to make_flagged_fuse.cpython-311.pyc byte-compiling build/bdist.macosx-10.9-x86_64/egg/ullyses/fuse_add_dq.py to fuse_add_dq.cpython-311.pyc byte-compiling build/bdist.macosx-10.9-x86_64/egg/ullyses/create_ullyses_hlsp.py to create_ullyses_hlsp.cpython-311.pyc byte-compiling build/bdist.macosx-10.9-x86_64/egg/ullyses/lcogt_hlsps_wrapper.py to lcogt_hlsps_wrapper.cpython-311.pyc byte-compiling build/bdist.macosx-10.9-x86_64/egg/ullyses/wrapper.py to wrapper.cpython-311.pyc byte-compiling build/bdist.macosx-10.9-x86_64/egg/ullyses/ctts_cal.py to ctts_cal.cpython-311.pyc byte-compiling build/bdist.macosx-10.9-x86_64/egg/ullyses/plot_stis_data.py to plot_stis_data.cpython-311.pyc byte-compiling build/bdist.macosx-10.9-x86_64/egg/ullyses/init.py to init.cpython-311.pyc byte-compiling build/bdist.macosx-10.9-x86_64/egg/ullyses/splittag_wrapper.py to splittag_wrapper.cpython-311.pyc byte-compiling build/bdist.macosx-10.9-x86_64/egg/ullyses/coadd.py to coadd.cpython-311.pyc byte-compiling build/bdist.macosx-10.9-x86_64/egg/ullyses/ullyses_hlsp.py to ullyses_hlsp.cpython-311.pyc byte-compiling build/bdist.macosx-10.9-x86_64/egg/ullyses/flag_vignetting.py to flag_vignetting.cpython-311.pyc byte-compiling build/bdist.macosx-10.9-x86_64/egg/ullyses/make_stis_x1ds.py to make_stis_x1ds.cpython-311.pyc byte-compiling build/bdist.macosx-10.9-x86_64/egg/ullyses/apply_cos_shifts.py to apply_cos_shifts.cpython-311.pyc byte-compiling build/bdist.macosx-10.9-x86_64/egg/ullyses/imaging_hlsps_wrapper.py to imaging_hlsps_wrapper.cpython-311.pyc byte-compiling build/bdist.macosx-10.9-x86_64/egg/ullyses/stis_coadd_x1d.py to stis_coadd_x1d.cpython-311.pyc byte-compiling build/bdist.macosx-10.9-x86_64/egg/ullyses/timeseries.py to timeseries.cpython-311.pyc creating build/bdist.macosx-10.9-x86_64/egg/EGG-INFO copying ullyses.egg-info/PKG-INFO -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO copying ullyses.egg-info/SOURCES.txt -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO copying ullyses.egg-info/dependency_links.txt -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO copying ullyses.egg-info/requires.txt -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO copying ullyses.egg-info/top_level.txt -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO zip_safe flag not set; analyzing archive contents... ullyses.pycache.apply_cos_shifts.cpython-311: module references path ullyses.pycache.create_ullyses_hlsp.cpython-311: module references path ullyses.pycache.ctts_cal.cpython-311: module references path ullyses.pycache.make_flagged_fuse.cpython-311: module references path ullyses.pycache.make_stis_x1ds.cpython-311: module references path ullyses.pycache.ullyses_hlsp.cpython-311: module references file ullyses.pycache.wrapper.cpython-311: module references path creating dist creating 'dist/ullyses-0.0.1-py3.11.egg' and adding 'build/bdist.macosx-10.9-x86_64/egg' to it removing 'build/bdist.macosx-10.9-x86_64/egg' (and everything under it) Processing ullyses-0.0.1-py3.11.egg creating /Users/mdecleir/opt/anaconda3/envs/depletions/lib/python3.11/site-packages/ullyses-0.0.1-py3.11.egg Extracting ullyses-0.0.1-py3.11.egg to /Users/mdecleir/opt/anaconda3/envs/depletions/lib/python3.11/site-packages Adding ullyses 0.0.1 to easy-install.pth file

Installed /Users/mdecleir/opt/anaconda3/envs/depletions/lib/python3.11/site-packages/ullyses-0.0.1-py3.11.egg Processing dependencies for ullyses==0.0.1 Searching for costools Reading https://pypi.org/simple/costools/ Downloading https://files.pythonhosted.org/packages/f5/6b/5ea71adab105a85ca70afb3182fa670b626434daf449f7049c36df94de00/costools-1.2.6-py3-none-any.whl#sha256=7071efd9e033244af30bd4ff2281c27a9b42ad7e71e88e5655caba0ad1d484e8 Best match: costools 1.2.6 Processing costools-1.2.6-py3-none-any.whl Installing costools-1.2.6-py3-none-any.whl to /Users/mdecleir/opt/anaconda3/envs/depletions/lib/python3.11/site-packages Adding costools 1.2.6 to easy-install.pth file detected new path './ullyses-0.0.1-py3.11.egg' Installing add_cos_s_region.py script to /Users/mdecleir/opt/anaconda3/envs/depletions/bin Installing add_cos_s_region script to /Users/mdecleir/opt/anaconda3/envs/depletions/bin Installing timefilter script to /Users/mdecleir/opt/anaconda3/envs/depletions/bin

Installed /Users/mdecleir/opt/anaconda3/envs/depletions/lib/python3.11/site-packages/costools-1.2.6-py3.11.egg Searching for calcos>=3.4.0 Reading https://pypi.org/simple/calcos/ Downloading https://files.pythonhosted.org/packages/00/96/1cab486b110194e9f5d75fe6bb91114c7202a9ac41cc186a03704abeb040/calcos-3.4.7.tar.gz#sha256=81f32f28666353fb767096b7ba82785410b9653b4bdb3ab94f35711c42b1ba05 Best match: calcos 3.4.7 Processing calcos-3.4.7.tar.gz Writing /var/folders/5s/s68mmmwn32dbh8c94q1s0wtm0002gv/T/easy_install-9hhh0vag/calcos-3.4.7/setup.cfg Running calcos-3.4.7/setup.py -q bdist_egg --dist-dir /var/folders/5s/s68mmmwn32dbh8c94q1s0wtm0002gv/T/easy_install-9hhh0vag/calcos-3.4.7/egg-dist-tmp-1gue_x4w /Users/mdecleir/opt/anaconda3/envs/depletions/lib/python3.11/site-packages/setuptools/init.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. !!

    ********************************************************************************
    Requirements should be satisfied by a PEP 517 installer.
    If you are using pip, you can try `pip install --use-pep517`.
    ********************************************************************************

!! dist.fetch_build_eggs(dist.setup_requires) listing git files failed - pretending there aren't any /Users/mdecleir/opt/anaconda3/envs/depletions/lib/python3.11/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. !!

    ********************************************************************************
    Please avoid running ``setup.py`` directly.
    Instead, use pypa/build, pypa/installer or other
    standards-based tools.

    See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
    ********************************************************************************

!! self.initialize_options() In file included from src/ccos.c:119: In file included from /Users/mdecleir/opt/anaconda3/envs/depletions/lib/python3.11/site-packages/numpy/core/include/numpy/arrayobject.h:5: In file included from /Users/mdecleir/opt/anaconda3/envs/depletions/lib/python3.11/site-packages/numpy/core/include/numpy/ndarrayobject.h:12: In file included from /Users/mdecleir/opt/anaconda3/envs/depletions/lib/python3.11/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929: /Users/mdecleir/opt/anaconda3/envs/depletions/lib/python3.11/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]

warning "Using deprecated NumPy API, disable it with " \

^ 1 warning generated. zip_safe flag not set; analyzing archive contents... calcos.pycache.init.cpython-311: module references file calcos.pycache.ccos.cpython-311: module references file No eggs found in /var/folders/5s/s68mmmwn32dbh8c94q1s0wtm0002gv/T/easy_install-9hhh0vag/calcos-3.4.7/egg-dist-tmp-1gue_x4w (setup script problem?) error: The 'calcos>=3.4.0' distribution was not found and is required by ullyses

tapastro commented 1 year ago

It looks like that might be a problem with calcos, but I don't know for sure. A workaround may be to first install calcos via pip install calcos prior to running the ullyses install?

@stscirij Any idea on this?

mdecleir commented 1 year ago

Thanks, it looks like installing calcos with pip solved the issue. Still I think it would be good to have this sorted out for the future, as I am not sure if all dependencies are now correct.

stscirij commented 1 year ago

It looks like it got calcos 3.4.7 from pypi but was unable to build it. I'll take a look

stscirij commented 1 year ago

A better way to install that doesn't require forking and cloning the repo would be:

pip install git+https://github.com/spacetelescope/ullyses.git

Or if you've cloned the repo and are in the top level ullyses directory (which has setup.py):

pip install .

jotaylor commented 9 months ago

@mdecleir you should now be able to install ULLYSES (and all necessary dependencies) via pip: pip install ullyses This will get you the DR6 version of the code from March 2023, although we expect to have a new version released in the coming weeks. Can you let us know if that works for you?

ladsantos commented 9 months ago

I was able to install ullyses through pip. When I tried installing it from source, I got the following error:

Searching for ullyses_utils
Doing git clone from https://github.com/spacetelescope/ullyses-utils to /var/folders/0q/ph_vqx8j58s5t8b4smvzpcf80002vw/T/easy_install-h7n8mwid/ullyses-utils@main
Checking out main
Best match: ullyses-utils 0.1
Processing ullyses-utils@main
error: Couldn't find a setup script in /var/folders/0q/ph_vqx8j58s5t8b4smvzpcf80002vw/T/easy_install-h7n8mwid/ullyses-utils@main
jotaylor commented 9 months ago

I was able to install ullyses through pip. When I tried installing it from source, I got the following error:

Searching for ullyses_utils
Doing git clone from https://github.com/spacetelescope/ullyses-utils to /var/folders/0q/ph_vqx8j58s5t8b4smvzpcf80002vw/T/easy_install-h7n8mwid/ullyses-utils@main
Checking out main
Best match: ullyses-utils 0.1
Processing ullyses-utils@main
error: Couldn't find a setup script in /var/folders/0q/ph_vqx8j58s5t8b4smvzpcf80002vw/T/easy_install-h7n8mwid/ullyses-utils@main

We're in the process of updating our pypi builds right now, so things may be a little out of sync for the next week. I'll post here again when it's in a steady state once more!

mdecleir commented 9 months ago

Thank you for this update. I am currently no longer using the Ullyses code, because at the time I needed it, it was not entirely suitable for what I needed to do. I ended up writing my own code. If I need the Ullyses code again in the future, I will try the pip install, and let you know if I run into issues.

jotaylor commented 9 months ago

@ladsantos The pypi builds have been updated, let me know if you still have issues.