camUrban / PteraSoftware

Ptera Software is a fast, easy-to-use, and open-source software package for analyzing flapping-wing flight.
MIT License
168 stars 32 forks source link

[BUG] No module named 'pterasoftware' #9

Closed Antyos closed 2 years ago

Antyos commented 2 years ago

Bug Description

After installing PteraSoftware through pip, (as stated in the README), Python is unable to import it. Running import pterasoftware as ps raises an exception.

When looking in the packages listed in the virtual environment, there is not a folder for pterasoftware, only PteraSoftware-1.2.0.dist-info. This seems wrong.

Reproduction

Create a virtual environment and install PteraSoftware:

python -m venv .venv
".venv/scripts/activate"
pip install pterasoftware
python

Make sure you are using Python 3.8.

Python shell:

>>> import pterasoftware as ps
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'pterasoftware'

Desktop

Additional Context

I have tested this on two different Windows machines, both with Pip directly and with Poetry. All have had the same issue.

camUrban commented 2 years ago

Thanks for the bug report! I'll take a look at this issue, and get back to you.

camUrban commented 2 years ago

Hi! Sorry for the long delay getting back to you. I've been slammed with schoolwork.

After a closer look, I've found that the issue is that the package uploaded to pip is named "src", not "pterasoftware". I mistakenly assumed that the package would be renamed to the distribution's name, but this isn't the case.

I'll release a hot-fix and then close this issue.

camUrban commented 2 years ago

Whew! That was a bit tricky to figure out. Thank you for bearing with me @Antyos. The issue is the latest release: v1.2.2!