Python Forum
[SOLVED] Upgraded Python: Module no longer found
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Upgraded Python: Module no longer found
#1
Question 
Hello,

After upgrading Python from 3.12.0 to 3.13.1, and manually editing Windows' PATH (otherwise, it still ran the previous version)… Python can no longer find a module that was available before:

ModuleNotFoundError: No module named 'ebooklib'
Why is that, and what's the fix?

Thank you.

--
Edit:
For others' benefit, here's the fix:
pip3 freeze --path c:\Users\joe\AppData\Local\Programs\Python\Python312\Lib\site-packages\ > python_requirements.txt
pip3 install -r python_requirements.txt
At least by default, looks like the Python installer doesn't take care of reinstalling the packages :-/

But it failed installing this package (possibly more, since the process doesn't ignore and proceed with the other modules):
Collecting Pillow==10.0.1 (from -r python_requirements.txt (line 59))
  Downloading Pillow-10.0.1.tar.gz (50.5 MB)
     ---------------------------------------- 50.5/50.5 MB 2.2 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
…
note: This error originates from a subprocess, and is likely not a problem with pip.
Looks like upgrading Python is a bit more involved that I naïvely thought.

--
Edit: With too many modules not compatible with the latest Python, I edited Windows' user PATH to go back.

But, while "python --version" does say 3.12.0… a module I use no longer works :-/

"ModuleNotFoundError: No module named 'ebooklib'"
Why does the module no longer load? Don't modules live in c:\Users\joe\AppData\Local\Programs\Python\Python312\Lib\site-packages\, and thus aren't affected by upgrading Python?

How do I go back to the working Python?

--
Edit: Besides not having the modules re-installed as part of the upgrade, and some modules being incompatible… the Py launcher used 3.13.1, causing the error. Re-running the installer to remove 3.13.1 solved the problem.
Reply
#2
You can use pyenv
Should you decide to install, you can use any version of python that is installed using pyenv.
Also take a look this local thread.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Upgraded Python: Module no longer found - for Linux Curbie 8 1,295 Mar-05-2025, 06:01 PM
Last Post: Curbie
  [SOLVED] Sub string not found in string ? jehoshua 4 1,337 Dec-03-2024, 09:17 PM
Last Post: jehoshua
  Module not found error even though installed NZGeorge 1 4,416 Jul-10-2024, 09:08 AM
Last Post: Larz60+
  SOLVED: Install mailer module in Python 3.11.2? Calab 3 2,077 Jul-03-2024, 02:03 PM
Last Post: Calab
  pyside6 module not found ForeverNoob 4 5,573 Aug-18-2023, 04:36 PM
Last Post: snippsat
  I found a problem with Python Lahearle 12 3,299 Jul-20-2023, 10:58 PM
Last Post: Pedroski55
  Beginner: Code not work when longer list raiviscoding 2 1,609 May-19-2023, 11:19 AM
Last Post: deanhystad
  [SOLVED] [BeautifulSoup] Why attribute not found? Winfried 0 1,238 Mar-11-2023, 10:00 PM
Last Post: Winfried
  Module Not Found Error bitoded 4 2,538 Jan-01-2023, 09:08 AM
Last Post: bitoded
  pdfminer package: module isn't found Pavel_47 25 16,498 Sep-18-2022, 08:40 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020