Closed bjfultn closed 4 years ago
I should mention that downgrading to astropy==3.2.3 allows the same script to run just fine.
Hi BJ, I tested this. Weird.
Could you please tell me the following when you get the error -
1) Astropy version 2) Astroquery version 3) Numpy version 4) Barycorrpy version
import numpy as np
import astropy
import astroquery
import barycorrpy
print("numpy = {}".format(np.__version__))
print("astropy = {}".format(astropy.__version__))
print("astroquery = {}".format(astroquery.__version__))
print("barycorrpy = {}".format(barycorrpy.__version__))
numpy = 1.18.1
astropy = 4.0
astroquery = 0.3.10
barycorrpy = 0.2.3
I now see that I seem to be running an older version of barycorrpy? Which is weird, because I'm messing with a fork of the repo that I just created yesterday.
Everything seems to indicate that I'm running version 0.3, especially since I'm making changes to the code that I see reflected after pip install .
. However, the __init__.py
file installed in my site-packages
directory says 0.2.3
.
Ah, this is because barycorrpy/build/lib/barycorrpy/__init__.py
still has __version__==0.2.3
OK, I was able to fix this by removing the contents of the build
directory and pip install .
again. Then I get a proper install of barycorrpy==0.3
and it works with the following versions:
numpy = 1.18.1
astropy = 4.0
astroquery = 0.4
barycorrpy = 0.3
Oh I see. Do you know if there is a way I can prevent that from happening? Remove the build/
directory from the GitHub repo?
Yeah, I don't think the build directory needs to be in the GitHub repo. See PR #34
Will add it to the .gitignore
Here is the error I see when running under astropy==4.0.0. I recommend specific package versions be specified in a
requirements.txt
file to avoid this type of issue.