Issue when installing Astropy

169 views
Skip to first unread message

David Paz

unread,
Jul 13, 2022, 2:52:58 AM7/13/22
to astropy-dev
Hi all,

i just tried to install astropy locally for development. I am a newbie with astropy but not with python.

I started a clean virtual environment with virtualenv and then followed instructions until the activation of the development version when i try to check version i get AttributeError.

I will post here the dependencies of my venv along with the result of checking the version. Any idea will be welcome

Thanks in advance and cheers,
David

---------

  ~/work/astronomy ·····································································································································  3m 12s  astropy  08:49:58
❯ pip freeze
-e git+ssh://g...@github.com/davidmpaz/astropy.git@19cc80471739bcb67b7e8099246b391c355023ee#egg=astropy
Cython==0.29.30
numpy==1.23.1
packaging==21.3
pyerfa==2.0.0.1
pyparsing==3.0.9
PyYAML==6.0

  ~/work/astronomy ··············································································································································  astropy  08:50:04
❯ python
Python 3.8.9 (default, Apr 13 2022, 08:48:06)
[Clang 13.1.6 (clang-1316.0.21.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import astropy
>>> astropy.__version__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'astropy' has no attribute '__version__'
>>>

David Paz

unread,
Jul 13, 2022, 3:54:06 AM7/13/22
to astropy-dev
Just to be more accurate.

All Tests pass. I did install the test dependencies with: pip install -e '.[test]'. And everything ended as expected.

I think the question here is whether I am dealing with an specific installation issue regarding my dev environment or some other undocumented issue.

Thanks in advance,

Cheers,
David

Pey Lian Lim

unread,
Jul 13, 2022, 3:44:03 PM7/13/22
to astropy-dev
That is weird. Do you have the stuff defined in pyproject.toml installed? https://github.com/astropy/astropy/blob/19cc80471739bcb67b7e8099246b391c355023ee/pyproject.toml#L1-L7

David Paz

unread,
Jul 14, 2022, 2:55:07 AM7/14/22
to astropy-dev
Hi, thanks for answering! No, i don't have all of them, I did install cython, because in the docs was asked to, just that one. 

After installing the test deps, what I have installed in my virtual environment is:

-e git+ssh://g...@github.com/davidmpaz/astropy.git@19cc80471739bcb67b7e8099246b391c355023ee#egg=astropy
attrs==21.4.0
coverage==6.4.2
Cython==0.29.30
execnet==1.9.0
hypothesis==6.46.7
iniconfig==1.1.1
numpy==1.23.1
packaging==21.3
pluggy==1.0.0
psutil==5.9.1
py==1.11.0
pyerfa==2.0.0.1
pyparsing==3.0.9
pytest==7.1.2
pytest-arraydiff==0.5.0
pytest-astropy==0.10.0
pytest-astropy-header==0.2.1
pytest-cov==3.0.0
pytest-doctestplus==0.12.0
pytest-filter-subpackage==0.1.1
pytest-forked==1.4.0
pytest-mock==3.8.2
pytest-openfiles==0.5.0
pytest-remotedata==0.3.3
pytest-xdist==2.5.0
PyYAML==6.0
sortedcontainers==2.4.0
tomli==2.0.1

Thanks in advance,
David

Pey Lian Lim

unread,
Jul 14, 2022, 3:24:16 PM7/14/22
to astropy-dev
And you still have a problem with __version__ after rebuilding with the new stack? Do you see anything when you do "pip freeze  | grep setup"?

Thomas Robitaille

unread,
Jul 14, 2022, 5:33:56 PM7/14/22
to astro...@googlegroups.com
On Wed, 13 Jul 2022 at 20:44, Pey Lian Lim <p3y...@gmail.com> wrote:
That is weird. Do you have the stuff defined in pyproject.toml installed? https://github.com/astropy/astropy/blob/19cc80471739bcb67b7e8099246b391c355023ee/pyproject.toml#L1-L7

FWIW the dependencies in pyproject.toml should only get installed in a temporary build environment by pip so it shouldn’t matter if these are not visible with ‘pip freeze’

Cheers,
Tom

--
You received this message because you are subscribed to the Google Groups "astropy-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astropy-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/astropy-dev/a91f3d9d-d844-461d-a8e8-5d05a0ebea37n%40googlegroups.com.

David Paz

unread,
Jul 15, 2022, 1:20:41 PM7/15/22
to astropy-dev
Yes, the same result. "pip freeze  | grep setup" gives me nothing.

thanks again,
David

David Paz

unread,
Jul 15, 2022, 1:23:41 PM7/15/22
to astropy-dev
Now a dummy question please. Is it too much of a problem the version issue? I mean all test are passing actually.

Pey Lian Lim

unread,
Jul 15, 2022, 6:24:01 PM7/15/22
to astropy-dev
As long as astropy is doing what you want, I guess it is okay. Except when you have to compare versions?

David Paz

unread,
Jul 16, 2022, 3:25:24 PM7/16/22
to astropy-dev
I guess that will do as for now :)

Thanks!

Reply all
Reply to author
Forward
0 new messages