Python Forum
Python 3.12 cannot import local python files as modules
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python 3.12 cannot import local python files as modules
#7
(Jul-26-2024, 04:52 PM)sunflowerdog Wrote: Otherwise I'm probably just going to stick with 3.11 which seems to have no problem doing so.
The strange thing is that the path to your project is not in sys.path when you run main.py. Can you compare with the sys.path that is printed in Python 3.11 ?
« We can solve any problem by introducing an extra level of indirection »
Reply


Messages In This Thread
RE: Python 3.12 cannot import local python files as modules - by Gribouillis - Jul-26-2024, 04:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Inserting Python Buttons into KV Files edand19941 3 694 Feb-19-2025, 07:44 PM
Last Post: buran
  How to write variable in a python file then import it in another python file? tatahuft 4 1,082 Jan-01-2025, 12:18 AM
Last Post: Skaperen
  python 3.13 : import whois HansieB 1 757 Nov-30-2024, 02:58 PM
Last Post: snippsat
  Conversion of Oracle PL/SQL(packages, functions, procedures) to python modules. DivyaKumar 3 8,463 Oct-01-2024, 03:32 PM
Last Post: Alex_Kirpichny
  Trying to generating multiple json files using python script dzgn989 4 2,691 May-10-2024, 03:09 PM
Last Post: deanhystad
  uploading files from a ubuntu local directory to Minio storage container dchilambo 0 1,489 Dec-22-2023, 07:17 AM
Last Post: dchilambo
  Different Ways to Import Modules RockBlok 2 1,489 Dec-11-2023, 04:29 PM
Last Post: deanhystad
  Newbie question about switching between files - Python/Pycharm Busby222 3 1,537 Oct-15-2023, 03:16 PM
Last Post: deanhystad
  open python files in other drive akbarza 1 1,575 Aug-24-2023, 01:23 PM
Last Post: deanhystad
  change directory of save of python files akbarza 3 3,830 Jul-23-2023, 08:30 AM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

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