Error pywin32
Mioultigaming opened this issue · 8 comments
Hi!
When I run the command python -m tmrl --test
it gives me an error:
INFO:root:pywin32 failed to import. Attempting to fix pywin32 installation...
ERROR:root:tmrl could not fix pywin32 on your system. The following exceptions were raised:
=== Exception 1 ===
str(e1)
=== Exception 2 ===
str(e2)
Please install pywin32 manually.
Traceback (most recent call last):
File "C:\Users\isabe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\tmrl\__init__.py", line 10, in <module>
import win32gui
ImportError: DLL load failed: Le module spécifié est introuvable.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\isabe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\tmrl\__init__.py", line 17, in <module>
fix_pywin32()
File "C:\Users\isabe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\tmrl\tools\init_package\init_pywin32.py", line 698, in fix_pywin32
install(destination)
File "C:\Users\isabe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\tmrl\tools\init_package\init_pywin32.py", line 433, in install
LoadSystemModule(lib_dir, "pywintypes")
File "C:\Users\isabe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\tmrl\tools\init_package\init_pywin32.py", line 196, in LoadSystemModule
mod = importlib.util.module_from_spec(spec)
File "<frozen importlib._bootstrap>", line 583, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1043, in create_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: DLL load failed: Le module spécifié est introuvable.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "C:\Users\isabe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\tmrl\__init__.py", line 25, in <module>
raise RuntimeError("Please install pywin32 manually: https://github.com/mhammond/pywin32")
RuntimeError: Please install pywin32 manually: https://github.com/mhammond/pywin32
So I installed pywin32
with conda install pywin32
but when I run the command again, it gives me the same error...
I don't know what to do, I'm stuck here. Thanks for your help.
Hi, what is your OS? The TrackMania environment is only supported on Windows.
pywin32
is problematic when installed with pip
, We should remove it from the list of requirements to avoid this situation maybe...
Can you try a fully clean install with conda please?
- uninstall tmrl:
pip uninstall tmrl
- delete your virtual environment if you have created one
- delete the
TmrlData
folder in your home directory - create a fresh virtual environment :
conda create -n tmrl python=3.10
- activate it:
conda activate tmrl
- install pywin32 from conda:
conda install pywin32
- install tmrl:
pip install tmrl --no-cache
Hello,
I am currently using Windows. I will test this
Windows 11? (I have Windows 11 and Windows 10 to try to reproduce your issue)
Also when you install tmrl, please double-check that pip
does find pywin32
and doesn't re-install another one.
Windows 11? (I have Windows 11 and Windows 10 to try to reproduce your issue)
I have Windows 10
Have you tried a clean install with conda?
If that fails, can you try to uninstall pywin32 from conda and follow their installation instructions on their GitHub page please? I see that their "post_install" script has changed recently, tmrl embbeds an older version of this script to fix installations from pip
, that might be why it doesn't work for you anymore idk.
It works with the conda installation!
I would like to know just one more thing, I don't understand very well how to train my own AI... I don't understand very well the documentation if it's possible to explain me...
I thank you in advance
Sure, I am Yann#1895 on Discord or yannbouteiller on Reddit if you need interactive help :)