Closed ggreco77 closed 6 years ago
I think the issue might be that you have named your script /users/greco/hips.py
, i.e. the same name as the hips
package.
Try renaming to e.g. /users/greco/hips_example.py
.
If this doesn't help, what is your version?
python -c 'import hips; print(hips.__version__)'
I did not rename the script; however also using the statement above I get the same issue ->
File "
thanks, giuseppe
I did not rename the script
Why not? Please try it.
Also, please paste not just part of the traceback, but show everything: the command you ran (probably python hips.py
?) and the complete traceback.
ah, ok sorry for misunderstanding -> I rename the script hips.py in hips_example.py in my home dir and I type
python3 hips_example.py
now the error is different;
_Traceback (most recent call last):
File "hipsexample.py", line 2, in
@ggreco77 This is probably because the .pyc
files present in the hips repository are damaged. Please try re-installing the package:
$ pip uninstall hips
And then install again:
$ pip install hips --no-deps
Another solution is to manually remove the .pyc
files (so Python can generate them again). First cd
into the directory where hips is installed. For me, it is:
$ cd /home/adeel/anaconda3/lib/python3.6/site-packages/hips
You can also locate the directory by typing:
$ locate python3.6/site-packages/hips
Finally, delete the .pyc
files:
$ find . -name \*.pyc -delete
Many thanks. Now it works fine by removing .pyc files.
👍
Hi, after installing hips (python3.6.3 in centos7) I get the following error during the check installation
File "/users/greco/hips.py", line 2, in
from hips import WCSGeometry
ImportError: cannot import name 'WCSGeometry'
thanks for such effort.