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

Unable to load DLL 'python37': The specified module could not be found. #5

Open
fenchu opened this issue Jan 30, 2020 · 1 comment
Open

Comments

@fenchu
Copy link

fenchu commented Jan 30, 2020

Hi I have python 3.7.6 X86_64 installed and it resides in $ENV:PATH, but after installing Snek, it does not seem to find the correct dll

PS C:\Users\ip_admin> Use-Python { Invoke-Python -Code "print('Hello, from Python!')" }
You cannot call a method on a null-valued expression.
At C:\Program Files\WindowsPowerShell\Modules\snek\1.3\snek.psm1:36 char:9
+         $runtime.Dispose()
+         ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Exception calling "GIL" with "0" argument(s): "Unable to load DLL 'python37': The specified module could not be found.
(Exception from HRESULT: 0x8007007E)"
At C:\Program Files\WindowsPowerShell\Modules\snek\1.3\snek.psm1:30 char:9
+         $runtime = [Python.Runtime.Py]::Gil()
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DllNotFoundException

PS C:\Users\ip_admin> which python
/c/Users/ip_admin/AppData/Local/Microsoft/WindowsApps/python
PS C:\Users\ip_admin> python --version
Python 3.7.6

$env:PATH
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\VMware\VMware VIX\;C:\ProgramData\chocolatey\bin;C:\Users\ip_admin\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Mozilla Firefox;C:\Program Files\Mozilla Firefox;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\ip_admin\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Digi\AnywhereUSB\
@fenchu
Copy link
Author

fenchu commented Jan 30, 2020

I deleted all my python versions and reinstalled 3.7.6, but checked the install for all users, so it installs to c:\Program Files\Python37 and not to the users appdirectory. Then it worked. But this is not the default way of installing python

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

1 participant