Jul-29-2024, 03:57 PM
(Jul-28-2024, 05:37 PM)snippsat Wrote: Do this see if itload 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']
Output:C:\>python
Python 3.12.4 (tags/v3.12.4:8e8a4ba, Jun 6 2024, 19:30:16) [MSC v.1940 64 bit (AMD64)] on win32
>>> import sys
>>> sys.meta_path
[<class '_frozen_importlib.BuiltinImporter'>, <class '_frozen_importlib.FrozenImporter'>, <class '_frozen_importlib_external.PathFinder'>]
Output:C:\code_1>python -m venv project_env
C:\code_1>cd project_env
C:\code_1\project_env>Scripts\activate.bat
(project_env) C:\code_1\project_env>python
Python 3.12.4 (tags/v3.12.4:8e8a4ba, Jun 6 2024, 19:30:16) [MSC v.1940 64 bit (AMD64)] on win32
>>> import bar
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'bar'
>>> from project_env import bar
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'project_env'
Wasn't sure where to put bar.py or main.py here but it doesn't seem to work no matter what. Not really surprised considering my other fresh installations haven't been any different. If it's an issue with my installation it's got to be something persistent that doesn't get changed when installing/uninstalling/setting up virtual environments. But I have no clue what that could even be.
I'm tempted to just open a virtual machine to see if maybe I need to just reinstall my entire operating system. Though at that rate I'll probably just move my projects over to another computer.