pygifsicle icon indicating copy to clipboard operation
pygifsicle copied to clipboard

1.0.6 ModuleNotFoundError: No module named 'IPython'

Open aurivus-ph opened this issue 4 years ago • 5 comments

Issue

Importing the pygifsicle module after installation yields the following error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File ".../.venv/lib/python3.9/site-packages/pygifsicle/__init__.py", line 4, in <module>
    support_luca("pygifsicle")
  File ".../.venv/lib/python3.9/site-packages/support_developer/luca.py", line 9, in support_luca
    support_message(
  File ".../.venv/lib/python3.9/site-packages/support_developer/support_message.py", line 49, in support_message
    from IPython.display import HTML, display
ModuleNotFoundError: No module named 'IPython'

This only happens in version 1.0.6. Version 1.0.5 is not affected.

Steps for Reproduction

# set up a fresh virtual environment and install pygifsicle
python3 -m venv .venv 
. .venv/bin/activate
pip install pygifsicle

# try to import pygifsicle
python3 -c 'import pygifsicle'

# ERROR!

Suggested Solution

IPython is required for this module, and should not become a dependency. I recommend skipping the support developer if it is not installed.

aurivus-ph avatar Nov 08 '22 09:11 aurivus-ph

Hello! Support developer is another (recent) package of mine that I created to let developers advertise their GitHub support a tad more.

I DEFINITELY need to fix corner cases such as this one, though I thought I had wrapped that in a ModuleNotFoundError try/except. Possibly I forgot to publish it to PyPi.

LucaCappelletti94 avatar Nov 08 '22 09:11 LucaCappelletti94

Hi Luca, a push would be greatly appreciated for non-.ipynb usage 👍🏽 Great work!

FFSchier avatar Nov 09 '22 10:11 FFSchier

@Glokta0 ETA 1 hour, save for more explosions

LucaCappelletti94 avatar Nov 09 '22 10:11 LucaCappelletti94

Thanks, this works fine!

aurivus-ph avatar Nov 09 '22 15:11 aurivus-ph