aendie / SkyAlmanac-Py3

Creates the daily pages of a Nautical Almanac using Skyfield (Python 3)
GNU General Public License v3.0
20 stars 3 forks source link

Missing module 'ephem' #1

Closed kzembower closed 4 years ago

kzembower commented 4 years ago

After successfully following directions to install on Linux, got this error:

$ python3 skyalmanac.py 
Traceback (most recent call last):
  File "skyalmanac.py", line 20, in <module>
    import tables
  File "/home/kevin/SkyAlmanac/SkyAlmanac-Py3-master/tables.py", line 23, in <module>
    from alma_ephem import *
  File "/home/kevin/SkyAlmanac/SkyAlmanac-Py3-master/alma_ephem.py", line 22, in <module>
    import ephem        # for sunrise/sunset, moonrise/moonset, planet magnitudes
ModuleNotFoundError: No module named 'ephem'
$

Even after installing module 'ephem' still get same error:

$ pip install ephem
Collecting ephem
  Downloading https://files.pythonhosted.org/packages/fe/df/7bceaef11e9cc0a9a98930bf2d7a90c71058f49c446a4b2c7cd1ccf35c1b/ephem-3.7.7.1.tar.gz (745kB)
    100% |████████████████████████████████| 747kB 435kB/s 
Building wheels for collected packages: ephem
  Running setup.py bdist_wheel for ephem ... done
  Stored in directory: /home/kevin/.cache/pip/wheels/14/4c/de/9e07d9cdc466db80537dbebfd8af892da8c8ffbd8019d85db8
Successfully built ephem
Installing collected packages: ephem
Successfully installed ephem-3.7.7.1
$ python3 skyalmanac.py 
Traceback (most recent call last):
  File "skyalmanac.py", line 20, in <module>
    import tables
  File "/home/kevin/SkyAlmanac/SkyAlmanac-Py3-master/tables.py", line 23, in <module>
    from alma_ephem import *
  File "/home/kevin/SkyAlmanac/SkyAlmanac-Py3-master/alma_ephem.py", line 22, in <module>
    import ephem        # for sunrise/sunset, moonrise/moonset, planet magnitudes
ModuleNotFoundError: No module named 'ephem'
$

Let me know if you need me to test anything.

-Kevin

aendie commented 4 years ago

I have no Linux installation to test on, however here is an idea I found on the web:

sudo apt-get update
sudo apt-get install python-ephem

Link: How to install python-ephem on Ubuntu 16.04

or to install on Python3:

sudo apt-get update -y
sudo apt-get install -y python3-ephem

Link: How To Install "python3-ephem" Package on Ubuntu

Also may be useful: How to Install python3-ephem software package in Ubuntu 17.04

Cannot install pyephem for python3

Let me know if this helps as I need to update the Linux installation instructions. Andrew P.S. I already responded by email with other suggestions.

kzembower commented 4 years ago

Hi, Andrew, thanks for the suggestion.

That seemed to work, but the error remains the same:

$ sudo apt-get install python-ephem Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: python-ephem 0 upgraded, 1 newly installed, 0 to remove and 10 not upgraded. Need to get 591 kB of archives. After this operation, 1,617 kB of additional disk space will be used. Get:1 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 python-ephem amd64 3.7.6.0-7build1 [591 kB] Fetched 591 kB in 2s (375 kB/s) Selecting previously unselected package python-ephem. (Reading database ... 381044 files and directories currently installed.) Preparing to unpack .../python-ephem_3.7.6.0-7build1_amd64.deb ... Unpacking python-ephem (3.7.6.0-7build1) ... Setting up python-ephem (3.7.6.0-7build1) ... $ python3 skyalmanac.py Traceback (most recent call last): File "skyalmanac.py", line 20, in import tables File "/home/kevin/SkyAlmanac/SkyAlmanac-Py3-master/tables.py", line 23, in from alma_ephem import * File "/home/kevin/SkyAlmanac/SkyAlmanac-Py3-master/alma_ephem.py", line 22, in import ephem # for sunrise/sunset, moonrise/moonset, planet magnitudes ModuleNotFoundError: No module named 'ephem' $

I appreciate your willingness to help. I really enjoyed using the old PyAlmanac.

-Kevin

On 2/27/20 1:52 PM, aendie wrote:

I have no Linux installation to test on, however here is an idea I found on the web:

|sudo apt-get update sudo apt-get install python-ephem |

Link: How to install python-ephem on Ubuntu 16.04 https://www.howtoinstall.co/en/ubuntu/xenial/python-ephem

Let me know if this helps as I need to update the Linux installation instructions. Andrew P.S. I already responded by email with other suggestions.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aendie/SkyAlmanac-Py3/issues/1?email_source=notifications&email_token=AALBCCTVBZNAAUKWPELX5XDRFADWZA5CNFSM4K4OZKR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENFQIRQ#issuecomment-592118854, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALBCCQCZ23HMNHOR4Z5ZRLRFADWZANCNFSM4K4OZKRQ.

aendie commented 4 years ago

You are using Python3, so please try:

sudo apt-get update -y
sudo apt-get install -y python3-ephem

I'm sure we can get this to work. What Linux software are you using? The original code was Python 2. The original Pyalmanac web site now contains a Pyalmanac version for Python 3, but there is a link to Pyalmanac in a Python 2 version on my GitHub site.

I think my email never reached you... could you also attempt to run this code (a simple test):

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import ephem

m = ephem.Mars('2003/8/27')
msg = "%s %s %.10f" %(m.name, m.elong, m.size)
txt = "Mars -173:00:34.2 25.1121063232"
print(msg)

if msg != txt:
    print("   --- INCORRECT ---")
else:
    print("   ==> correct answer <==")

Also, as this is a PyEphem installation issue, I wrote an email to the author, Brandon Rhodes, at: brandon@rhodesmill.org

Kind Regards, Andrew

kzembower commented 4 years ago

Hi, Andrew,

Well, installing python3-ephem seemed to fix one problem, but revealed another:

$ sudo apt-get install python3-ephem ... The following NEW packages will be installed: python3-ephem ... Unpacking python3-ephem (3.7.6.0-7build1) ... Setting up python3-ephem (3.7.6.0-7build1) ... $ python3 skyalmanac.py Traceback (most recent call last): File "skyalmanac.py", line 20, in import tables File "/home/kevin/SkyAlmanac/SkyAlmanac-Py3-master/tables.py", line 24, in from alma_skyfield import * File "/home/kevin/SkyAlmanac/SkyAlmanac-Py3-master/alma_skyfield.py", line 24, in from skyfield.api import Topos, Star, load ModuleNotFoundError: No module named 'skyfield' $ sudo apt-get install skyfield ... E: Unable to locate package skyfield $ sudo apt-get install python3-skyfield ... E: Unable to locate package python3-skyfield $ sudo apt-get install python-skyfield ... E: Unable to locate package python-skyfield $

As you can see, I tried a couple of logical options, without success.

Not sure what you're asking re: What Linux software I'm using. I only run Linux, and use a great variety of Linux software.

I've only received three emails from you, none of them long. Two were in regard to this issue, and the first one was in regard to the patch I developed for the previous author of PyAlmanac regarding date printing. It's subject was "Re: [rodegerdts/Pyalmanac] Fix for lack of printing date in meridian passage tables (#1)"

Let me know how I can help. Thanks for working on this issue.

-Kevin

On 2/27/20 4:55 PM, aendie wrote:

You are using Python3, so please try:

|sudo apt-get update -y sudo apt-get install -y python3-ephem |

Did you also receive my (long) email? I'm sure we can get this to work. What Linux software are you using?

Kind Regards, Andrew

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aendie/SkyAlmanac-Py3/issues/1?email_source=notifications&email_token=AALBCCTSH5J4OH6TACOOEULRFAZD7A5CNFSM4K4OZKR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENGDGIA#issuecomment-592196384, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALBCCRT77Y7MB4VHOU4SC3RFAZD7ANCNFSM4K4OZKRQ.

brandon-rhodes commented 4 years ago

@kzembower — My guess is that your system has both Python 2 and Python 3 installed, and that you are installing packages under Python 2 with the pip command. This leaves the separate Python 3 install without any of the packages you are looking for.

If you install the Ubuntu package python3-pip, you will get a pip3 binary that installs packages for Python 3. Running pip3 install ephem skyfield should hopefully get you up and running.

I always use "virtual environments" instead of trying to install things system-wide. Other folks who are more involved in the science community used the Anaconda ecosystem. One of the more modern guides to installing packages (though maybe not the best? I've not read many of the new ones) is:

https://packaging.python.org/tutorials/installing-packages/

Hopefully the above hints will get things working for you!

aendie commented 4 years ago

One more tip - if you enjoyed using the old Pyalmanac, you can of course stay with Pyalmanac. This does not require the new Skyfield package. Download (don't fork) either the Python 2 or Python 3 version depending whether you want to remain with Python 2 or "upgrade" to and run it with Python 3.

Pyalmanac for Python 2 is here: https://github.com/aendie/Pyalmanac-Py2 Pyalmanac for Python 3 is here: https://github.com/aendie/Pyalmanac-Py3

Good luck and let us know if this works. Pyalmanac runs fastest!

P.S. "Re: [rodegerdts/Pyalmanac] Fix for lack of printing date in meridian passage tables (#1)" is a PULL request to Enno's GitHub site from 7 Nov 2017 and is obsolete. That's why I closed it. It is no longer relevant (and incompatible with the latest version).

kzembower commented 4 years ago

Brandon and Andrew, thanks so much for devoting so much time and energy to helping me.

Brandon, you are absolutely right that I run both Python2 and 3. You would also be correct in assuming that I don't know much about administering them.

I believe that your suggestion fixed my problem. At the end of this note, I've pasted in the extensive output of installing the modules and running the skyalmanac program. The only change in your directions that I had to make was to run 'pip3 install ephem skyfield pandas'. The program seemed to run normally after this. However, now it looks like I'm missing pdflatex; I'll investigate this. Also, it looks like nothing was generated when this error occurs; I can't find anything in the current directory with today's date.

Brandon or Andrew, by the way, did either of you accept my pull-request to fix the code to print the date in meridian passage tables, in the original PyAlmanac?

Also, I noticed that there are PDF document included for A4 paper. Any chance to amend these for North American 'letter' size paper?

Thanks, again, for all your help. Let me know if there's anything I can do.

-Kevin

On 2/27/20 11:27 PM, Brandon Rhodes wrote:

@kzembower https://github.com/kzembower — My guess is that your system has both Python 2 and Python 3 installed, and that you are installing packages under Python 2 with the |pip| command. This leaves the separate Python 3 install without any of the packages you are looking for.

If you install the Ubuntu package |python3-pip|, you will get a |pip3| binary that installs packages for Python 3. Running |pip3 install ephem skyfield| should hopefully get you up and running.

I always use "virtual environments" instead of trying to install things system-wide. Other folks who are more involved in the science community used the Anaconda ecosystem. One of the more modern guides to installing packages (though maybe not the best? I've not read many of the new ones) is:

https://packaging.python.org/tutorials/installing-packages/

Hopefully the above hints will get things working for you!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aendie/SkyAlmanac-Py3/issues/1?email_source=notifications&email_token=AALBCCXMFPXUAQPSDFSSQ7LRFCHBPA5CNFSM4K4OZKR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENG6JEQ#issuecomment-592307346, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALBCCTORZEOYTTBJFEFGHTRFCHBPANCNFSM4K4OZKRQ.

===================================================================== $ sudo apt-get install python3-pip Reading package lists... Done Building dependency tree Reading state information... Done python3-pip is already the newest version (9.0.1-2.3~ubuntu1.18.04.1). 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. $ pip3 install ephem skyfield Collecting ephem Using cached https://files.pythonhosted.org/packages/fe/df/7bceaef11e9cc0a9a98930bf2d7a90c71058f49c446a4b2c7cd1ccf35c1b/ephem-3.7.7.1.tar.gz Collecting skyfield Using cached https://files.pythonhosted.org/packages/f2/b5/3ba63f4c67e4d38ac41a6c981d4627ab326fc9d76f12b85f4a144c472456/skyfield-1.17.tar.gz Collecting jplephem>=2.11 (from skyfield) Using cached https://files.pythonhosted.org/packages/9a/2c/f50972e9e579a988a64bde55014eb6d8d13f1c5358189b9f7c93c24ca1f8/jplephem-2.13.tar.gz Collecting numpy (from skyfield) Downloading https://files.pythonhosted.org/packages/62/20/4d43e141b5bc426ba38274933ef8e76e85c7adea2c321ecf9ebf7421cedf/numpy-1.18.1-cp36-cp36m-manylinux1_x86_64.whl (20.1MB) 100% |████████████████████████████████| 20.2MB 89kB/s Collecting sgp4>=2.2 (from skyfield) Downloading https://files.pythonhosted.org/packages/5c/9e/b839bece60c84ac7f04ad441de6c1a8eb4f0cc0f5bcff973c295d09427a6/sgp4-2.4-cp36-cp36m-manylinux1_x86_64.whl (231kB) 100% |████████████████████████████████| 235kB 1.1MB/s Building wheels for collected packages: ephem, skyfield, jplephem Running setup.py bdist_wheel for ephem ... done Stored in directory: /home/kevin/.cache/pip/wheels/14/4c/de/9e07d9cdc466db80537dbebfd8af892da8c8ffbd8019d85db8 Running setup.py bdist_wheel for skyfield ... done Stored in directory: /home/kevin/.cache/pip/wheels/18/1c/52/a4018ee37293698d7c2fd372263545323339dca0ee0032a174 Running setup.py bdist_wheel for jplephem ... done Stored in directory: /home/kevin/.cache/pip/wheels/55/3a/5f/83d6e63a6004826236c1bf0ce18ac1384c3585fd78437d0810 Successfully built ephem skyfield jplephem Installing collected packages: ephem, numpy, jplephem, sgp4, skyfield Successfully installed ephem-3.7.7.1 jplephem-2.13 numpy-1.18.1 sgp4-2.4 skyfield-1.17

$ python3 skyalmanac.py Traceback (most recent call last): File "/home/kevin/.local/lib/python3.6/site-packages/skyfield/data/hipparcos.py", line 52, in load_dataframe from pandas import read_fwf ModuleNotFoundError: No module named 'pandas'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "skyalmanac.py", line 20, in import tables File "/home/kevin/SkyAlmanac/SkyAlmanac-Py3-master/tables.py", line 24, in from alma_skyfield import * File "/home/kevin/SkyAlmanac/SkyAlmanac-Py3-master/alma_skyfield.py", line 48, in df = hipparcos.load_dataframe(f) File "/home/kevin/.local/lib/python3.6/site-packages/skyfield/data/hipparcos.py", line 54, in load_dataframe raise ImportError(PANDAS_MESSAGE) ImportError: Skyfield needs Pandas to load the Hipparcos catalog

To load the Hipparcos star catalog, Skyfield needs the Pandas data analysis toolkit. Try installing it using your usual Python package installer, like "pip install pandas" or "conda install pandas".

$ pip3 install pandas Collecting pandas Downloading https://files.pythonhosted.org/packages/08/ec/b5dd8cfb078380fb5ae9325771146bccd4e8cad2d3e4c72c7433010684eb/pandas-1.0.1-cp36-cp36m-manylinux1_x86_64.whl (10.1MB) 100% |████████████████████████████████| 10.1MB 159kB/s Collecting python-dateutil>=2.6.1 (from pandas) Using cached https://files.pythonhosted.org/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl Collecting numpy>=1.13.3 (from pandas) Using cached https://files.pythonhosted.org/packages/62/20/4d43e141b5bc426ba38274933ef8e76e85c7adea2c321ecf9ebf7421cedf/numpy-1.18.1-cp36-cp36m-manylinux1_x86_64.whl Collecting pytz>=2017.2 (from pandas) Using cached https://files.pythonhosted.org/packages/e7/f9/f0b53f88060247251bf481fa6ea62cd0d25bf1b11a87888e53ce5b7c8ad2/pytz-2019.3-py2.py3-none-any.whl Collecting six>=1.5 (from python-dateutil>=2.6.1->pandas) Using cached https://files.pythonhosted.org/packages/65/eb/1f97cb97bfc2390a276969c6fae16075da282f5058082d4cb10c6c5c1dba/six-1.14.0-py2.py3-none-any.whl Installing collected packages: six, python-dateutil, numpy, pytz, pandas Successfully installed numpy-1.18.1 pandas-1.0.1 python-dateutil-2.8.1 pytz-2019.3 six-1.14.0

$ python3 skyalmanac.py What do you want to create?:

 1   Full nautical almanac   (for a year)
 2   Just tables for the sun (for a year)
 3   Nautical almanac   - 6 days from today
 4   Tables for the sun - 30 days from today

1 Please enter the year you want to create the nautical almanac for as yyyy ... or the FIRST and LAST year as yyyy-yyyy 2020 What table style is required?:

 t   Traditional
 m   Modern

t Be patient - this may take a while.

Creating the nautical almanac for the year 2020

Jan .......... Feb ........ Mar .......... Apr ......... May ......... Jun ......... Jul ......... Aug .......... Sep ......... Oct ......... Nov ......... Dec ......... execution time = 168.33 seconds

sh: 1: pdflatex: not found finished creating nautical almanac for 2020 Traceback (most recent call last): File "skyalmanac.py", line 129, in os.remove("almanac%s%s.log" %(ff,year+DecFmt)) FileNotFoundError: [Errno 2] No such file or directory: 'almanac2020.log'

$ which pdflatex

$ whereis pdflatex pdflatex:

$ locate pdflatex

$ lt # alias for 'ls -lat' total 31816 -rw-r--r-- 1 kevin kevin 36593 Feb 18 12:44 tables.py -rw-r--r-- 1 kevin kevin 14528 Feb 18 12:44 suntables.py -rw-r--r-- 1 kevin kevin 6743 Feb 18 12:44 skyalmanac.py -rw-r--r-- 1 kevin kevin 6439 Feb 18 12:44 README.md -rw-r--r-- 1 kevin kevin 24577 Feb 18 12:44 Ra.JPG -rw-r--r-- 1 kevin kevin 35149 Feb 18 12:44 LICENSE -rw-r--r-- 1 kevin kevin 11457 Feb 18 12:44 increments.py -rw-r--r-- 1 kevin kevin 1436 Feb 18 12:44 config.py -rw-r--r-- 1 kevin kevin 32189 Feb 18 12:44 alma_skyfield.py -rw-r--r-- 1 kevin kevin 17083 Feb 18 12:44 alma_ephem.py -rw-r--r-- 1 kevin kevin 128066 Feb 18 12:44 A4chart180-360_P.pdf -rw-r--r-- 1 kevin kevin 109779 Feb 18 12:44 A4chart180-360_L.pdf -rw-r--r-- 1 kevin kevin 130118 Feb 18 12:44 A4chart0-180_P.pdf -rw-r--r-- 1 kevin kevin 111460 Feb 18 12:44 A4chart0-180_L.pdf -rw-r--r-- 1 kevin kevin 27849 Feb 26 16:59 tables.pyc -rw-r--r-- 1 kevin kevin 1151 Feb 26 16:59 config.pyc -rw-r--r-- 1 kevin kevin 8545 Feb 26 16:59 alma_ephem.pyc -rw-r--r-- 1 kevin kevin 24984 Feb 26 16:59 alma_skyfield.pyc -rw-r--r-- 1 kevin kevin 11760 Feb 26 16:59 deltat.data -rw-r--r-- 1 kevin kevin 2237 Feb 26 16:59 deltat.preds -rw-r--r-- 1 kevin kevin 1359 Feb 26 16:59 Leap_Second.dat -rw-r--r-- 1 kevin kevin 16788480 Feb 26 17:00 de421.bsp -rw-r--r-- 1 kevin kevin 14786649 Feb 26 17:00 hip_main.dat.gz -rw-r--r-- 1 kevin kevin 11162 Feb 26 17:00 suntables.pyc drwxr-xr-x 2 kevin kevin 4096 Feb 28 10:02 pycache

$ cd pycache/

$ ll total 120 drwxr-xr-x 2 kevin kevin 4096 Feb 28 10:02 ./ drwxr-xr-x 3 kevin kevin 4096 Feb 28 10:06 ../ -rw-r--r-- 1 kevin kevin 6841 Feb 26 16:50 alma_ephem.cpython-36.pyc -rw-r--r-- 1 kevin kevin 21534 Feb 27 21:29 alma_skyfield.cpython-36.pyc -rw-r--r-- 1 kevin kevin 846 Feb 26 16:50 config.cpython-36.pyc -rw-r--r-- 1 kevin kevin 9612 Feb 28 10:02 suntables.cpython-36.pyc -rw-r--r-- 1 kevin kevin 24337 Feb 26 16:50 tables.cpython-36.pyc

kzembower commented 4 years ago

Hi, Andrew, thanks for the tip. I was interested in the SkyAlmanac because I thought it had increase accuracy over PyAlmanac. Time to generate doesn't much matter to me; I run it once then use the pages throughout the year.

Thanks, again, for all your work on this project.

-Kevin

On 2/28/20 2:57 AM, aendie wrote:

One more tip - if you enjoyed using the old Pyalmanac, you can of course stay with Pyalmanac. This does not require the new Skyfield package. Download (don't fork) either the Python 2 or Python 3 version depending whether you want to remain with Python 2 or "upgrade" to and run it with Python 3.

Pyalmanac for Python 2 is here: https://github.com/aendie/Pyalmanac-Py2 Pyalmanac for Python 3 is here: https://github.com/aendie/Pyalmanac-Py3

Good luck and let us know if this works. Pyalmanac runs fastest!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aendie/SkyAlmanac-Py3/issues/1?email_source=notifications&email_token=AALBCCXXXQIEAOOYBOE3UZDRFC7X7A5CNFSM4K4OZKR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENHTZUQ#issuecomment-592395474, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALBCCVWGD3QW7ADVJRGJODRFC7X7ANCNFSM4K4OZKRQ.

kzembower commented 4 years ago

Brandon and Andrew,

I was successful in installing pdflatex, from the package texlive-latex-base. However, there were still some problems. I pasted in the end of the run of 'python3 skyalmanac.py' at the end of this note. No output files were written in this run.

Here are three seemingly significant errors:

! LaTeX Error: File `multirow.sty' not found.

! LaTeX Error: File `tikz.sty' not found.

pdfTeX warning: pdflatex (file ./A4chart0-180_P.pdf): PDF inclusion: found PDF version <1.5>, but at most version <1.4> allowed

pdfTeX warning: pdflatex (file ./A4chart180-360_P.pdf): PDF inclusion: found PD F version <1.5>, but at most version <1.4> allowed

On a completely unrelated note, what's the difference between Traditional and Modern formats?

Thanks, again.

-Kevin

On 2/27/20 11:27 PM, Brandon Rhodes wrote:

@kzembower https://github.com/kzembower — My guess is that your system has both Python 2 and Python 3 installed, and that you are installing packages under Python 2 with the |pip| command. This leaves the separate Python 3 install without any of the packages you are looking for.

If you install the Ubuntu package |python3-pip|, you will get a |pip3| binary that installs packages for Python 3. Running |pip3 install ephem skyfield| should hopefully get you up and running.

I always use "virtual environments" instead of trying to install things system-wide. Other folks who are more involved in the science community used the Anaconda ecosystem. One of the more modern guides to installing packages (though maybe not the best? I've not read many of the new ones) is:

https://packaging.python.org/tutorials/installing-packages/

Hopefully the above hints will get things working for you!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aendie/SkyAlmanac-Py3/issues/1?email_source=notifications&email_token=AALBCCXMFPXUAQPSDFSSQ7LRFCHBPA5CNFSM4K4OZKR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENG6JEQ#issuecomment-592307346, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALBCCTORZEOYTTBJFEFGHTRFCHBPANCNFSM4K4OZKRQ.

=================================================================================== Sep ......... Oct ......... Nov ......... Dec ......... execution time = 171.20 seconds

This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode (./almanac2020.tex LaTeX2e <2017-04-15> Babel <3.18> and hyphenation patterns for 3 language(s) loaded. (/usr/share/texlive/texmf-dist/tex/latex/base/report.cls Document Class: report 2014/09/29 v1.4h Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo)) (/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty (/usr/share/texlive/texmf-dist/tex/latex/base/utf8.def (/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.dfu) (/usr/share/texlive/texmf-dist/tex/latex/base/ot1enc.dfu) (/usr/share/texlive/texmf-dist/tex/latex/base/omsenc.dfu))) (/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty (/usr/share/texlive/texmf-dist/tex/generic/babel/switch.def) (/usr/share/texlive/texmf-dist/tex/generic/babel-english/english.ldf (/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def (/usr/share/texlive/texmf-dist/tex/generic/babel/txtbabel.def)))) (/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty) (/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty) (/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty))

! LaTeX Error: File `multirow.sty' not found.

Type X to quit or to proceed, or enter new name. (Default extension: sty)

Enter file name: (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty) (/etc/texmf/tex/latex/config/graphics.cfg) (/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def)))

! LaTeX Error: File `tikz.sty' not found.

Type X to quit or to proceed, or enter new name. (Default extension: sty)

Enter file name: No file almanac2020.aux. geometry driver: auto-detecting geometry detected driver: pdftex (/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] ) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty))) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty)))) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty) (/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))

pdfTeX warning: pdflatex (file ./A4chart0-180_P.pdf): PDF inclusion: found PDF version <1.5>, but at most version <1.4> allowed

pdfTeX warning: pdflatex (file ./A4chart180-360_P.pdf): PDF inclusion: found PD F version <1.5>, but at most version <1.4> allowed [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map} <./A4chart0-180_P.pdf> <. /A4chart180-360_P.pdf>] [2] ! Undefined control sequence. \@sharp ->\rule {0pt}{2.4ex}\multirow {2}{}{\textbf {Lat.}} l.343 ...pt}{2.4ex}\multirow{2}{}{\textbf{Lat.}}} & ? ! Undefined control sequence. \@sharp ->\multirow {2}{}{\textbf {Sunrise}} l.345 ...}{|c|}{\multirow{2}{}{\textbf{Sunrise}}} & ? ! Undefined control sequence. \@sharp ->\multirow {2}{}{\textbf {Sunset}} l.346 ...{1}{c|}{\multirow{2}{}{\textbf{Sunset}}} & ? ! Emergency stop. \@sharp ->\multirow {2}{}{\textbf {Sunset}} l.346 ...{1}{c|}{\multirow{2}{}{\textbf{Sunset}}} & ! ==> Fatal error occurred, no output PDF file produced! Transcript written on almanac2020.log. finished creating nautical almanac for 2020 $

aendie commented 4 years ago

Okay. That's good progress you are making. Again I am handicapped not having a Linux (Ubuntu or Debian) installation, but I try to make useful suggestions. Just for information: when using MiKTeX on Windows 10, this includes pdflatex and installs any missing components (such as multirow, tikz, booktabs, colortbl, xcolor, etc.) on-the-fly.

So I simply Googled your error message and came up with this suggestion to install the missing 'multirow' package (I don't know what the following commands mean):

tlmgr update --self
tlmgr install multirow

... and this link was referenced: https://yihui.org/tinytex/

However, since I like the way that MiKTeX is regularly maintained and installs any missing required packages automatically, perhaps you would consider de-installing your current pdlaftex software and installing MiKTeX on Linux? Instructions are here: https://miktex.org/howto/install-miktex-unx

The difference between 't' (traditional) and 'm' (modern) style layout is that 't' looks like the original Pyalmanac tables and also like a printed Nautical Almanac. I designed 'm' to use the booktabs package for some tables as well as a bit of color. This table style is recommended for LaTeX authors.

Here I include two sample mini-almanacs: sample_almanacs.zip Note that a small sample (beginning with the current date) can be created using option 3 or 4.

You are right that the output is only for A4 sized paper - just like the original Pyalmanac. However your suggestion is good and I could look into it. It is sometimes a major battle to squeeze a lot of information onto one page using LaTeX without getting tons of Overflow or Underflow messages from pdflatex. So although it sounds simple, it is an art to achieve the desired result and takes a lot of "tweaking". That letter-sized paper is wider is an advantage - the problem arises that the height is less, but I may manage this by reducing the top and bottom margins. I will look into this as it would be nice to include LETTER size as an option. I'll consider this for a future update.

As always - stay in touch keeping us posted on your progress. Thanks!! Andrew

P.S. MiKTeX would solve the "PDF version <1.5>, but at most version <1.4> allowed" error as MiKTeX can handle it. I don't yet if I can create the older version 1.4 ... I'll look into it.

aendie commented 4 years ago

In this (SkyAlmanac-Py3) repository I recreated and replaced four PDF star charts with PDF v1.4 (previously they were PDF v1.5).

So you should not get the "PDF version <1.5>, but at most version <1.4> allowed" error any more.

Hope this helps - - - Andrew

kzembower commented 4 years ago

Andrew and Brandon, I've achieved significant success. I installed the Ubuntu package 'textlive-full'. It is a monster, with more than 2GB downloaded, and more than 4GB disk space used when unpacked. However, it seems to have all the packages needed for SkyAlmanac.

I didn't download the updated skymap files, but as the pdflatex message was a warning, not an error, it still compiled fine.

Man, are these pages beautiful! Thank you both for all the work you put into this. Your care and craftsmanship really shows.

Let me know if there's anything I can do to help.

-Kevin

On 2/28/20 12:36 PM, aendie wrote:

Okay. That's good progress you are making. Again I am handicapped not having a Linux (Ubuntu or Debian) installation, but I try to make useful suggestions. Just for information: when using MiKTeX on Windows 10, this includes /pdflatex/ and installs any missing components (such as multirow, tikz, booktabs, colortbl, xcolor, etc.) on-the-fly.

So I simply Googled your error message and came up with this suggestion to install the missing 'multirow' package (I don't know what the following commands mean):

|tlmgr update --self tlmgr install multirow |

... and this link was referenced: https://yihui.org/tinytex/

However, since I like the way that MiKTeX is regularly maintained and installs any missing required packages automatically, perhaps you would consider de-installing your current /pdlaftex/ software and installing MiKTeX on Linux? Instructions are here: https://miktex.org/howto/install-miktex-unx

The difference between 't' (traditional) and 'm' (modern) style layout is that 't' looks like the original Pyalmanac tables and also like a printed Nautical Almanac. I designed 'm' to use the /booktabs/ package for some tables as well as a bit of color. This table style is recommended for LaTeX authors.

Here I include two sample mini-almanacs: sample_almanacs.zip https://github.com/aendie/SkyAlmanac-Py3/files/4268224/sample_almanacs.zip Note that a small sample (beginning with the current date) can be created using option 3 or 4.

You are right that the output is only for A4 sized paper - just like the original Pyalmanac. However your suggestion is good and I could look into it. It is sometimes a major battle to squeeze a lot of information onto one page using LaTeX without getting tons of Overflow or Underflow messages from /pdflatex/. So although it sounds simple, it is an art to achieve the desired result and takes a lot of "tweaking". That letter-sized paper is wider is an advantage - the problem arises that the height is less, but I may manage this by reducing the top and bottom margins. I will look into this as it would be nice to include LETTER size as an option. I'll consider this for a future update.

As always - stay in touch keeping us posted on your progress. Thanks!! Andrew

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aendie/SkyAlmanac-Py3/issues/1?email_source=notifications&email_token=AALBCCUS3JMUMQ7KTUUXPF3RFFDRRA5CNFSM4K4OZKR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENJPD7I#issuecomment-592638461, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALBCCUWHKGTJHCLREXAZQ3RFFDRRANCNFSM4K4OZKRQ.

aendie commented 4 years ago

Well done! And thanks for your continued efforts. I would like to have better guidelines for installing Skyalmanac on Linux, so I would appreciate your feedback on this.

I have now updated all the PDF files I posted on GitHub to PDF v1.4. They just don't need to be PDF v1.5 which was the default when I built them (using Hipparcos star data from Skyfield).

Your suggestion to implement Letter-formatted output has got me busy. I'm working on it. (There will be a parameter in the config.py file where you choose A4 or Letter.) It involves tweaking margin widths and even removing vertical spacing within tables in critical situations. It will be in the next update I release (initially for Skyalmanac).

aendie commented 4 years ago

All versions of Pyalmanac, SFalmanac and Skyalmanac can now create Letter-sized and A4-sized pages. A parameter in config.py selects the desired paper size.

The publisher on https://thenauticalalmanac.com/ has reported no issues and uses Ubuntu. I will close this issue if I don't hear from you in the near future. Thanks for your cooperation and tips.

aendie commented 4 years ago

I finally got Ubuntu 19.10 installed and I had similar issues as you had. For example,

! LaTeX Error: File `multirow.sty' not found.
--------------------
! LaTeX Error: File `tikz.sty' not found.
--------------------

but the solution is this: sudo apt install texlive-latex-extra instead of installing texlive-latex-base.

I updated the instructions in GitHub - now for installing on Ubuntu 19.10 or higher (and a tiny change in skyalmanac.py in case no .log or .aux file is created). Thus I finally close this issue and hope you have no more troubles.

P.S. This web site has good information on the various TeX Live packages: https://tex.stackexchange.com/questions/245982/differences-between-texlive-packages-in-linux

kzembower commented 4 years ago

Absolutely, Andy. Please consider this issue closed. Thanks so much for all your work on this project.

I have a just-barely-related question for you, if you have the time. I'm hoping you can answer this based on your work creating the star-chart at the beginning of the Nautical Almanac, and your expertise with Python.

I would like to draw charts and forms like the Universal Plotting Sheet (which I'm sure you're familiar with) or Smith Charts (see https://en.wikipedia.org/wiki/Smith_chart). I know that, with enough work, any computer programming language can do any task, but would you recommend using Python to draw charts of this type? What Python modules would you use? Or, is there another system that you'd use to programmatically draw charts like these?

Thanks for your advice, and again, for all the work you do on the Nautical Almanac and Skyalmanac project.

-Kevin

On 3/27/20 4:33 PM, aendie wrote:

I finally got Ubuntu 19.10 installed and I had similar issues as you had. For example,

|! LaTeX Error: File multirow.sty' not found. -------------------- ! LaTeX Error: Filetikz.sty' not found. -------------------- |

but the solution is this: |sudo apt install texlive-latex-extra | instead of installing texlive-latex-base.

I updated the instructions in GitHub - now for installing on Ubuntu 19.10 or higher (and a tiny change in skyalmanac.py in case no .log or .aux file is created). Thus I finally close this issue and hope you have no more troubles.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aendie/SkyAlmanac-Py3/issues/1#issuecomment-605302865, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALBCCT4GAH4H3JBZ3YZB5DRJUES7ANCNFSM4K4OZKRQ.

aendie commented 4 years ago

Great question ... seeing as I studied Electronic Engineering at university (and forgot everything 6 months later). There are many Smith Charts available for download, so I'm guessing that your requirement is to generate your own Smith Chart and draw graphs according to scale on it.

Let's take this offline - reply with your email (add extra spaces and replace the '@' symbol with something). I'd be happy to work with you on this.