-
Notifications
You must be signed in to change notification settings - Fork 24
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
Cannot install tractor #93
Comments
We are having the same problem. Has this issue been resolved? |
This is probably coming from an old Swig version. What version do you have (swig -version)? 4.0.1 is known to work. |
Can you please attach the generated mp_fourier_wrap.c file also. |
Hi @dstndstn, We updated to swig version 4.0.2 and are sure this is the version that Make and the python setup scripts are using. However, we get the same failure. ''' compile options: '-I/mnt/quasar/joe/miniconda3/envs/qso_fitting/lib/python3.9/site-packages/numpy/core/include -I/mnt/quasar/joe/miniconda3/envs/qso_fitting/include/python3.9 -c' |
The mp_fourier_wrap.c is also attached. Note we are using Linux CentOS 7.0. |
Thanks -- if you are using a git checkout, could you also send 'git describe' and 'git branch'? Note that we renamed the 'master' branch to 'main', so if you had an older checkout (where 'git branch' shows 'master'), you would have to do:
|
Oh, this is ringing a bell. What compiler are you using? I get exactly the same mp_fourier_wrap.c file, and if you look at the line it's complaining about, the compiler is not recognizing the 'restrict' keyword. That's a C99 feature, so maybe you need
OR, try building using setup.py rather than make:
|
yeah, when I try centos7 (with docker) and So try that CPPFLAGS setting, and if that works for you I'll update the Makefile. |
The CPPFLAGS setting still raises an error that is ignored: '''(base) [rnanni@igm tractor]$ make CPPFLAGS="-std=c99" creating build compile options: '-UNDEBUG -I/home/rnanni/anaconda3/lib/python3.7/site-packages/numpy/core/include -I/home/rnanni/anaconda3/include/python3.7m -c' compile options: '-I/home/rnanni/anaconda3/lib/python3.7/site-packages/numpy/core/include -I/home/rnanni/anaconda3/include/python3.7m -c' When I try the test script I get: |
The warnings are normal and not anything to worry about. To fix the 'version' error, do
|
I just pushed a commit that will hopefully address both of these issues for you. |
Ok, thanks. I see that simply following your second option (python setup.py build_ext --inplace), the issue is solved without needing the "make version". I still cannot run the test example as it seems that it is not able to find astrometry.util: |
You did `make py` in the Astrometry.net code, right...?
…On Thu, Nov 11, 2021 at 9:13 AM Rik-ad-astra ***@***.***> wrote:
Ok, thanks. I see that simply following your second option (python
setup.py build_ext --inplace), the issue is solved without needing the
"make version". I still cannot run the test example as it seems that it is
not able to find astrometry.util:
'''
Traceback (most recent call last):
File "examples/tractor-sdss-synth.py", line 20, in
from tractor import *
File "/mnt/quasar2/rnanni/softwares/tractor/tractor/sfd.py", line 9, in
from astrometry.util.util import anwcs_t
File "/usr/local/astrometry/lib/python/astrometry/util/util.py", line 13,
in
from . import _util
ImportError: cannot import name '_util' from 'astrometry.util'
(/usr/local/astrometry/lib/python/astrometry/util/*init*.py)
(base) ***@***.*** tractor]$ python examples/tractor-sdss-synth.py
Traceback (most recent call last):
File "examples/tractor-sdss-synth.py", line 20, in
from tractor import *
File "/mnt/quasar2/rnanni/softwares/tractor/tractor/sfd.py", line 9, in
from astrometry.util.util import anwcs_t
File "/usr/local/astrometry/lib/python/astrometry/util/util.py", line 13,
in
from . import _util
ImportError: cannot import name '_util' from 'astrometry.util'
(/usr/local/astrometry/lib/python/astrometry/util/*init*.py)
'''
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#93 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIEH7JMTWF3TXNA6RRN5UTULPFQDANCNFSM4IOYETLA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Yeah, I think we did. Actually, I am able to import "from astrometry.util.starutil_numpy import radectolb", while "from astrometry.util.util import anwcs_t" is rising the aforementioned error. I thought that without the "make py" even the first import shouldn't work |
No, the `make py` generates the *compiled* python modules. starutil_numpy
is pure python, while util is compiled.
…On Thu, Nov 11, 2021 at 9:45 AM Rik-ad-astra ***@***.***> wrote:
Yeah, I think we did. Actually, I am able to import "from
astrometry.util.starutil_numpy import radectolb", while "from
astrometry.util.util import anwcs_t" is rising the aforementioned error. I
thought that without the "make py" even the first import shouldn't work
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#93 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIEH7O4UNES3XHFIDHJS3DULPJHTANCNFSM4IOYETLA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
I could not install the latest master branch (5908427). When I rolled it back to 3b4cc61, I was able to install. I attached the error message below.
The text was updated successfully, but these errors were encountered: