Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue installing in conda environment - astrometry.utils not found #105

Open
dmasters opened this issue May 26, 2023 · 3 comments
Open

Issue installing in conda environment - astrometry.utils not found #105

dmasters opened this issue May 26, 2023 · 3 comments

Comments

@dmasters
Copy link

I am trying to install Tractor and astrometry.net in a conda environment using pip (from yaml file):

- pip:
    - git+https://github.com/dstndstn/astrometry.net.git@main
    - git+https://github.com/dstndstn/tractor.git@main

This worked before, and seems to complete successfully. However, I now get an error loading Tractor because the package "astrometry.utils" is not found, and I don't see the utils directory in the conda env .../site-packages/astrometry/ directory where it would normally live after a successful installation.

@dstndstn
Copy link
Owner

dstndstn commented May 26, 2023 via email

@dmasters
Copy link
Author

dmasters commented Jun 9, 2023

Thanks, Dustin. We were able to get a workaround installation running, by specifying a previous version of setuptools and earlier versions of tractor and astrometry.net. Not ideal, but it works for now. We thought this could potentially help debug the issue with pip installation. The details are below.

  1. We create a conda environment with setuptools<66.0.0 before PEP 440 version compliance was enforced.

The env.yaml file looks like this:

name: tractor
channels:
- conda-forge
- default
dependencies:
- astropy
- astropy-healpix
- fitsio
- gsl
- healpy
- ipykernel
- mpi4py
- netpbm
- numpy
- pandas
- pip <23.0
- pyopencl
- python >=3.10.0
- pyyaml
- requests
- seaborn
- setuptools < 66.0.0
- scikit-image
- scipy
- swig

  1. We store pip’s dependencies in a separate file requirements.txt (using previous version of tractor that we had working in December):

git+https://github.com/dstndstn/[email protected]
git+https://github.com/dstndstn/tractor.git@cf8bac3

  1. We install with the following:

conda env create --name tractor_20230604 --file env.yaml
conda activate tractor_20230604
pip install -r requirements.txt

@jhod0
Copy link

jhod0 commented Aug 21, 2023

I am also running into this problem. It looks like the setup.py is not properly copying over sub-directories in the installation process.

On my local machine, I am able to get around this by using pip install --editable . in the cloned astrometry repo, which just points python to the current directory rather than copying the astrometry files so the right place. This is not ideal but might help other people

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants