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
#19
Do this see if it load frozen_importlib_external.PathFindet loads.
>>> import sys
>>> sys.meta_path
[<_distutils_hack.DistutilsMetaFinder object at 0x0000022BD615F800>,
 <class '_frozen_importlib.BuiltinImporter'>,
 <class '_frozen_importlib.FrozenImporter'>,
 <class '_frozen_importlib_external.PathFinder'>]
Make a virtual environment as shown before in post under 3.
This to see if it same error is here,virtual environment is like new light Python version.
Then when environment is active.
G:\div_code\project_env
(project_env) λ python
Python 3.12.2 (tags/v3.12.2:6abddd9, Feb  6 2024, 21:26:36) [MSC v.1937 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>>
>>> sys.path
['', 'G:\\Projects', 'G:\\div_code', 'G:\\div_code\\project_env', 'C:\\python312\\python312.zip', 'C:\\python312\\DLLs', 'C:\\python312\\Lib', 'C:\\python312', 'G:\\div_code\\project_env\\Lib\\site-packages']
Reply


Messages In This Thread
RE: Python 3.12 cannot import local python files as modules - by snippsat - Jul-28-2024, 05:37 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Inserting Python Buttons into KV Files edand19941 3 730 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,140 Jan-01-2025, 12:18 AM
Last Post: Skaperen
  python 3.13 : import whois HansieB 1 779 Nov-30-2024, 02:58 PM
Last Post: snippsat
  Conversion of Oracle PL/SQL(packages, functions, procedures) to python modules. DivyaKumar 3 8,514 Oct-01-2024, 03:32 PM
Last Post: Alex_Kirpichny
  Trying to generating multiple json files using python script dzgn989 4 2,770 May-10-2024, 03:09 PM
Last Post: deanhystad
  uploading files from a ubuntu local directory to Minio storage container dchilambo 0 1,508 Dec-22-2023, 07:17 AM
Last Post: dchilambo
  Different Ways to Import Modules RockBlok 2 1,518 Dec-11-2023, 04:29 PM
Last Post: deanhystad
  Newbie question about switching between files - Python/Pycharm Busby222 3 1,562 Oct-15-2023, 03:16 PM
Last Post: deanhystad
  open python files in other drive akbarza 1 1,601 Aug-24-2023, 01:23 PM
Last Post: deanhystad
  change directory of save of python files akbarza 3 3,936 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