0 votes
116 views

I'm new to Astro Data Lab and am trying to install it on my Mac.  I use Conda version 4.13.0 to manage Python environments, and I don't know how that interacts with installation using pip.

In the terminal, I activated the Conda environment I plan to do my programming in.  Then I did the command,

pip install astro-datalab

At the end, I got the following message:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.                                                                                                                                                                       

jwst 1.8.4 requires certifi==2022.5.18.1, but you have certifi 2022.12.7 which is incompatible.

drizzlepac 3.5.0 requires markupsafe<=2.0.1, but you have markupsafe 2.1.2 which is incompatible. 

Successfully installed Pillow-10.3.0 asdf-3.2.0 asdf-standard-1.1.1 astro-datalab-2.23.1 astropy-5.3.4 chardet-5.2.0 feedpars3.8.4 ndcube-2.2.1 numpy-1.23.5 pandas-2.1.4 pycurl-7.45.3 pycurl-requests-0.5.0 pyvo-1.1.4.1.post1 scipy-1.11.4 sgmllib3k-1.0.0 specutils-1.13.0 tzdata-2024.1 

Running pip again (by accident) resulted in nothing but "requirement already satisfied" statements for the list of packages, with no errors mentioned.

I started Python (version 3.10.6) and tried to load the package:

>>> import datalab

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

ModuleNotFoundError: No module named 'datalab'

I'm assuming that those two version conflicts for certifi and markupsafe are the problem, but I'm hesitant to downgrade the versions I already have, because this could cause problems with other packages.

So first: I want astro-datalab in order to make queries of a star catalog from a large program I've written.  Right now, I don't need it for anything other than queryClient.  Is there any way to install astro-datalab with these two conflicts unresolved?

Second:  If I have to resolve them, is there a way of doing it with a new Conda environment where I don't need to degrade the versions I already have and might need for my other programs?

Finally, I don't really understand how pip and Conda might interact, so I could be looking at this entirely wrong.

by tshamilton (160 points)
edited by 0 | 116 views

1 Answer

+1 vote
Best answer

Hi Tim,

Thanks for the question.  The version incompatibilities are simply being reported by pip, they aren't being caused by the installation of astro-datalab (i.e. they were present with the initial conda installation).  Although version problems can sometimes be an issue, in this case I think you can ignore the warnings or if needed update the packages in your conda environment.  Pip and conda installs can be done in a mixed environment, pip will simply install in whatever the current conda system is.

As for using the datalab package, 'dl' is the proper package name to use, e.g. 

    from dl import queryClient as qc
    res = qc.query ('select * from usno.a2 limit 10', fmt='pandas')

Hope this helps, post back if you continue to have problems.

by datalab (21.6k points)
selected by 0
Wonderful.  I just checked, and the import command and code you posted works.  I must have seen an outdated module name somewhere else.

Thanks for the helpful reply!

449 questions

463 answers

473 comments

658 users

Welcome to Data Lab Help Desk, where you can ask questions and receive answers from other members of the community.

Categories