tudat-team / tudatpy

A Python platform to perform astrodynamics and space research.

Home Page:https://tudat-space.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"ModuleNotFound" error when importing "plot_miller_ground_track"

pietrosilvagni opened this issue · comments

When importing "plot_miller_ground_track" using this line:

" from tudatpy.plotting import plot_miller_ground_track "

The following error is shown:

" from mpl_toolkits.basemap import Basemap

ModuleNotFoundError: No module named 'mpl_toolkits.basemap' "

I have already discussed this with Dominic, and it looks like this error message is due to a bug.

@gaffarelj & @DominicDirkx, this is ideally fixed by adding matplotlib and basemap to this list here in the feedstock. If I understand correctly, matplotlib is currently installed via an environment file which includes tudatpy for the courses. Since tudatpy has a matplotlib dependency for its plotting module, we should rather add the dependencies to the conda package itself.

Also, to add a test during the conda packaging, tudatpy.plotting.plot_miller_ground_track can be added here, which will test the function by simply importing it, catching what @pietrosilvagni encountered.

I made the appropriate changes with this commit.

@pietrosilvagni in your case, instead of re-installing tudatpy when the next conda package is released, you can run the following two lines in the conda environment in which you use tudatpy:

conda install matplotlib
conda install basemap