Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoHotkey.py can't load the Python DLL if Python is installed from Microsoft Store #15

Open
Perlence opened this issue Oct 10, 2022 · 4 comments

Comments

@Perlence
Copy link
Owner

The script errors out with Cannot load Python DLL: 5.

The user running the script is not an admin.

@trajano
Copy link

trajano commented Oct 11, 2022

Seems like python_dll_path() works correctly.

>>> python_dll_path()
'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0\\python310.dll'

@Perlence
Copy link
Owner Author

It does, but I had to use admin access to open that directory.

@trajano
Copy link

trajano commented Oct 11, 2022

But you can access the file directly.

ls -l  'C:/Program Files/WindowsApps/PythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0/python3.dll'

@trajano
Copy link

trajano commented Oct 11, 2022

I'm not exactly sure but it looks like if you want LOAD_WITH_ALTERED_SEARCH_PATH you should add the DLLs folder as well.

It's readable BTW

 ls -l  'C:/Program Files/WindowsApps/PythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0/DLLs/'*.dll

5 means access denied, but it's readable so the only thing I can think of is that it's not considered executable, but not sure if there's a specific thing for that in Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants