marcusvolz / strava_py

Create artistic visualisations with your exercise data (Python version)
MIT License
152 stars 18 forks source link

Starting cli.py gives error: ModuleNotFoundError: No module named 'stravavis' #16

Closed jmizv closed 1 year ago

jmizv commented 1 year ago

Thanks for the app, it looks quite nice. But as I'm a bit new to Python, I'm having trouble to get it started.

I cloned the repo and tried from its root directory: jmizv@MacBook strava_py % python3 src/stravavis/cli.py /Users/jmizv/Downloads/gpx

But I just got that error message:

Traceback (most recent call last):
  File "/Users/jmizv/IdeaProjects/strava_py/src/stravavis/cli.py", line 91, in <module>
    main()
  File "/Users/jmizv/IdeaProjects/strava_py/src/stravavis/cli.py", line 41, in main
    from stravavis.plot_calendar import plot_calendar
ModuleNotFoundError: No module named 'stravavis'
jmizv@MacBook strava_py % 

I'm probably missing something obvious but I don't see it. Could you, @marcusvolz, please give an advice?

hugovk commented 1 year ago

You need to install it first. For example:

git clone https://github.com/marcusvolz/strava_py
cd strava_py
pip install -e .

And then you can run stravavis directly, also from another directory:

stravavis --help
stravavis tests/gpx
ls *.png

Something we could next do is publish this to PyPI, then you only need to do pip install stravavis

@marcusvolz Shall I go ahead and do this?

marcusvolz commented 1 year ago

@hugovk that would be great!

hugovk commented 1 year ago

Done!

https://pypi.org/project/stravavis/

You can install with pip install stravavis

I followed https://github.com/marcusvolz/strava_py/blob/main/RELEASING.md

@marcusvolz If you create an account on https://pypi.org/ (and optionally https://test.pypi.org/) I'll also give you admin access to those pages.

I'll check why images aren't showing at https://pypi.org/project/stravavis/

I'll also update the README to include the pip install command (and we should really say python -m pip installinstead ofpip install`: https://snarky.ca/why-you-should-use-python-m-pip/).

hugovk commented 1 year ago

Instructions and fixed images: PR https://github.com/marcusvolz/strava_py/pull/17.

hugovk commented 1 year ago

Merged and released as v0.0.2 with working images: https://pypi.org/project/stravavis/

Thanks @jmizv for the report, I think we can close this now.

marcusvolz commented 1 year ago

Thanks @hugovk - P.S. username on pypi.org is marcusvolz

hugovk commented 1 year ago

Invited!