×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Re:KStars Mac DMG 3.4.0 beta testing needed

  • Posts: 527
  • Thank you received: 139

OK, ran it in terminal:
Collecting pyfits
  Downloading https://files.pythonhosted.org/packages/c0/5d/ffae283cea526bce7c1154e7309a040a3e8c02e973b2360bcfc8f30134ef/pyfits-3.5.tar.gz (1.7MB)
    100% |████████████████████████████████| 1.7MB 8.5MB/s 
Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from pyfits) (1.18.0)
Installing collected packages: pyfits
  Running setup.py install for pyfits ... done
Successfully installed pyfits-3.5
You are using pip version 10.0.1, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Installed ok. Sover still didn't work. I attached the log. I tried it with both the default python directory and my 3.7 install directory.

File Attachment:

File Name: log_17-14-26.txt
File Size:88 KB
4 years 2 months ago #48890
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 1957
  • Thank you received: 420
I still see "AttributeError: 'NoPyfits' object has no attribute 'open'"... The error message mentions line 672 of the file

/Applications/KStars.app/Contents/MacOS/astrometry/lib/python/astrometry/util/fits.py

which is

pf = pyfits.open(dataorfn, memmap=mmap)

At the top of that file I see some code that defines NoPyfits as an empty class and then tries to see if fitsio, pyfits or astropy are installed. If not, it defaults to the empty NoPyfits class. However, much lower in the log I see
Package    Version\n---------- -------\nastropy    4.0    \nnumpy      1.18.0 \npip        10.0.1 \npyfits     3.5    \nsetuptools 39.0.1 \nvirtualenv 16.7.9

which indicates that astropy 4.0 and pyfits 3.5 have been found. This really makes no sense...
Last edit: 4 years 2 months ago by Wouter van Reeven.
4 years 2 months ago #48897

Please Log in or Create an account to join the conversation.

  • Posts: 527
  • Thank you received: 139
Well, the reason you see it twice is that I ran the solver two times. Once with the settings default directory set, and once with it changed to my Python 3.7 install directory.
4 years 2 months ago #48899

Please Log in or Create an account to join the conversation.

  • Posts: 1957
  • Thank you received: 420
And both times the NoPyfits error is there however only the SECOND time I see the report about the installed Python packages...
4 years 2 months ago #48901

Please Log in or Create an account to join the conversation.

  • Posts: 2877
  • Thank you received: 812
To clarify one key point: pyfits was the old package that astrometry.net used to rely on. We used to use that as a rule on OS X since we were using python2. But about a year ago (I think?), we switched over to python3 and the astropy package since that is the new preferred setup by the folks at astrometry.net. The old one is "depreciated." that being said, if there is a problem and astrometry can't find astropy, it tries next for pyfits, and if it can't find that, it prints an error message about pyfits not having an attribute open.
4 years 2 months ago #48902

Please Log in or Create an account to join the conversation.

  • Posts: 1957
  • Thank you received: 420
By now I reached that same conclusion. Thanks for clarifying that Rob! Indeed, Lead_weight can do an

<code>pip3 uninstall pyfits</code>

I suspect that despite the commands as provided by Lead_weight, Python expects to find the astropy package in a different location than it is. Perhaps some PYTHONPATH variable somewhere pointing at the wrong directory or so. I am lost to be honest.


Wouter
Last edit: 4 years 2 months ago by Wouter van Reeven.
4 years 2 months ago #48903

Please Log in or Create an account to join the conversation.

  • Posts: 2877
  • Thank you received: 812
I am suspecting that your homebrew python is pointing to a site packages directory that doesn't exist, and that is probably a big part of the problem, but I would have thought that changing the PATH variable to have the Library/Frameworks python in it would have fixed that.

Here's another thought, what if we give your python a new python path variable and see if that helps. If it does, I can modify KStars to include this variable if it is needed.

Command 1, As before:
export PATH=/Applications/KStars.app/Contents/MacOS/netpbm/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

Command 2, this is what we can try:
export PYTHONPATH=/Library/Frameworks/Python.framework/Versions/3.7/bin

or maybe it should be
export PYTHONPATH=/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages

(please check those paths to make sure they exist, and try both of them to see if they work.)

Command 3: Whatever KStars does as the solve-field command, something like this from your log:
/Applications/KStars.app/Contents/MacOS/astrometry/bin/solve-field -O --no-plots --no-verify --resort --downsample 8 -3 114.222 -4 65.6153 -5 15 -L 0.356183 -H 0.435335 -u app --config /Applications/KStars.app/Contents/MacOS/astrometry/bin/astrometry.cfg -W /private/var/folders/3h/qv07m29x1xgdcddv3qmrhr140000gn/T/solution.wcs /Volumes/Work Files/Astrophotography Save Files/2020/NGC 2403 - Edge 11/NGC2403 asi2600mcpro/Session 1/Light/NGC2403_Light_120_secs_2020-01-23T22-58-22_051.fits
4 years 2 months ago #48904

Please Log in or Create an account to join the conversation.

  • Posts: 2877
  • Thank you received: 812

Yep, that is exactly what I am thinking. I used to provide that environment variable in KStars when it used the embedded python to do plate solving. When we switched to using the system/homebrew python, I took it out. Maybe the variable is still needed when there is a different/custom install like this one.
4 years 2 months ago #48905

Please Log in or Create an account to join the conversation.

  • Posts: 1957
  • Thank you received: 420
Perhaps

PYTHONPATH=/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7

could work.
4 years 2 months ago #48906

Please Log in or Create an account to join the conversation.

  • Posts: 527
  • Thank you received: 139
Incidentally, I have the same setup on my Mac laptop. This is my desktop we're trying to fix. The main difference being I didn't accidentally install additional versions of Python on my laptop, and it works just fine. It's only my desktop that has several installs of python that is not working.

Anyhow, which commands should I be trying? Uninstall pyfits? Try those custom paths, or all of them?
4 years 2 months ago #48908

Please Log in or Create an account to join the conversation.

  • Posts: 2877
  • Thank you received: 812
I don't think uninstalling pyfits would do much, you can certainly do so, but it shouldn't affect it at all. I think let's focus on getting it to solve.

Let's try each of the custom PYTHONPATH's to see if any of them work
4 years 2 months ago #48910

Please Log in or Create an account to join the conversation.

  • Posts: 2877
  • Thank you received: 812
Honestly, the documentation for this isn't that great online, so knowing which of the 3 paths work and which ones don't is useful info
4 years 2 months ago #48911

Please Log in or Create an account to join the conversation.

Time to create page: 0.256 seconds