geomagpy / magpy

MagPy (or GeomagPy) is a Python package for analysing and displaying geomagnetic data.
BSD 3-Clause "New" or "Revised" License
45 stars 27 forks source link

Error when starting xmagpy on anaconda2, x64 with geomagpy 0.4.0 #90

Closed spark-corona closed 3 years ago

spark-corona commented 6 years ago

When starting xmagpy on anaconda2, x64 ubuntu 18.04 the following error occors.

~$ xmagpy Traceback (most recent call last): File "/home/----/Software/Programming/anaconda2/bin/xmagpy", line 3, in from magpy.gui.magpy_gui import MagPyApp File "/home/----/Software/Programming/anaconda2/lib/python2.7/site-packages/magpy/gui/magpy_gui.py", line 17, in from wx.lib.pubsub import pub File "/home/----/Software/Programming/anaconda2/lib/python2.7/site-packages/wx/lib/pubsub/init.py", line 38, in from pubsub import * File "/home/----/Software/Programming/anaconda2/lib/python2.7/site-packages/pubsub/pub.py", line 146 def getDefaultPublisher() -> Publisher: ^ SyntaxError: invalid syntax

Trying to replace wxpthon 4.0.3 with version 3.0.0 or 2.8 did NOT solve the problem.

Also trying to replace Pypubsub with version number 3.3.0 did NOT solve the problem.


Maybe this could be an option for the needed change:

https://stackoverflow.com/questions/5374451/importerror-cannot-import-name-publisher


sparky-corona commented 5 years ago

Think I found a workaround for the wxpython problem I always had when starting xmagpy on my laptop.

Looks like there are two packages which can be installed by

conda install -c asmeurer pango

Info from here: https://stackoverflow.com/questions/40009184/error-importing-cv2-in-python3-anaconda

By doing so conda forced a reinstall of wxpython 3.0.0.

Since then the problem disappeared.

best greet

Niko

leonro commented 5 years ago

An alternative would be: conda install -c bjornfjohansson wxpython which will install wxpython 3.0.2.0 (testet with MagPy 0.4.6)

leonro commented 3 years ago

Issue is fixed from 0.9.3 onwards when using python3