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

E370: Could not load library python36.dll #48

Closed
FR4N7Z opened this issue Feb 22, 2018 · 10 comments
Closed

E370: Could not load library python36.dll #48

FR4N7Z opened this issue Feb 22, 2018 · 10 comments

Comments

@FR4N7Z
Copy link

FR4N7Z commented Feb 22, 2018

Hello,
I am using the lasversion of vim with dynamic support of python 3.
When I run :version, Vim is looking for Python36.DLL.
Python3 is installed in C:\Program Files (x86)\Python36-32, the DLL is in this folder and this folder is in the PATH. But when I run :python3 print("Hello world"), it returns
E370: Could not load library python36.dll
E263: Sorry this command is disabled, the Python library could not be loaded.
Thank you.

@k-takata
Copy link
Member

What does :echo system('where python36.dll') show?

@FR4N7Z
Copy link
Author

FR4N7Z commented Feb 23, 2018

It say in French that it is impossible to find files for the model

@k-takata
Copy link
Member

Then the PATH setting might be something wrong?
What does :echo $PATH show?

@FR4N7Z
Copy link
Author

FR4N7Z commented Feb 23, 2018

The path show C:\Program Files (x86)\Python36-32\ where is python36.dll.

@i-give-up
Copy link

i-give-up commented Mar 4, 2018

@FR4N7Z If you try to run python on cmd.exe or powershell, does it start the python interpreter with some text like this?

Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

Second question: did you install the 32-bit Vim or 64-bit Vim? The bit must match between Vim and python's dll.

@FR4N7Z
Copy link
Author

FR4N7Z commented Mar 4, 2018

Yes it show a message like this.
And yes Vim is 32 bits.
Thank you.

@i-give-up
Copy link

i-give-up commented Mar 4, 2018

That's very odd. If the dll is in any directory in $PATH, Vim should be able to find it. Just tested it myself too by moving the python36.dll to a random directory in $PATH then running :py3 print("hello") in gVim

My environment: Windows 8.1, Python 3.6.4 32-bit (user installation), gVim 8.0.1555 (installed using vim-win32-installer).

There's one more thing to try: run this in Vim (replace \path\to with your actual directory).

:let &pythonthreedll = 'C:\path\to\python36.dll'

@FR4N7Z
Copy link
Author

FR4N7Z commented Mar 5, 2018

That's work! I think this is a bug but your trick works. Thank you.

@dhvalden
Copy link

I had the same problem for some reason. This is the only solution I've found so far. Thanks a lot!!!

evandrocoan added a commit to evandrocoan/dotfiles that referenced this issue Dec 24, 2019
Cygwin filepaths and git (windows build) on Cygwin Vim
junegunn/vim-plug#896

E370: Could not load library python36.dll
vim/vim-win32-installer#48

Calling wrong python3 interpreter under Cygwin
Shougo/deoplete.nvim#1030
@chrisbra
Copy link
Member

chrisbra commented Jan 3, 2020

I am closing this.

@chrisbra chrisbra closed this as completed Jan 3, 2020
evandrocoan added a commit to evandrocoan/dotfiles that referenced this issue Jun 28, 2021
Cygwin filepaths and git (windows build) on Cygwin Vim
junegunn/vim-plug#896

E370: Could not load library python36.dll
vim/vim-win32-installer#48

Calling wrong python3 interpreter under Cygwin
Shougo/deoplete.nvim#1030
perXautomatik pushed a commit to perXautomatik/dotfiles that referenced this issue Aug 23, 2023
Cygwin filepaths and git (windows build) on Cygwin Vim
junegunn/vim-plug#896

E370: Could not load library python36.dll
vim/vim-win32-installer#48

Calling wrong python3 interpreter under Cygwin
Shougo/deoplete.nvim#1030
perXautomatik pushed a commit to perXautomatik/dotfiles that referenced this issue Oct 19, 2023
Cygwin filepaths and git (windows build) on Cygwin Vim
junegunn/vim-plug#896

E370: Could not load library python36.dll
vim/vim-win32-installer#48

Calling wrong python3 interpreter under Cygwin
Shougo/deoplete.nvim#1030
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

5 participants