Gvim cannot execute :python nor :python3. Windows7, Python33 - python

I installed Gvim on my windows 7. When I type
:python print hello
I got the following errors
Similarly, when I type
:python3 print hello
The errors change to
The version information of the Gvim I installed is
And my python is version 3.3.2. I already put the path C:\Python33\DLLs to my $Path environment variable. In the DLLs directory, there is a python3.dll
Any help is appreciated. :-)

It sounds like either your Gvim was not build with python/python3 or it really can't find python32.dll.
in the output of :version do you see +python and/or +python3?
where is python32.dll located on your system? (you mentioned python3.dll but not python32.dll which is what it is looking for)
If the problem is #1 then How to enable Python support in gVim on Windows? might be helpful.

Have you installed 64 Bit Python? If so, you might face such issues. I had faced similar issues so, I removed 64 Bit Python and installed 32 Bit python and it worked.
On the other hand, if you have to absolutely work with 64 Bit Python, try using a 64 Bit Vim Version - You can try out this link. http://solar-blogg.blogspot.com.au/p/vim-build.html

You have to put this in your path: C:\Python33 NOT C:\Python33\DLLs

Related

Python3.5.2 bdist_wininst: Python version -32 required, which was not found in the registry

I' ve got an issue with a package I created with Python 3.5.2 32-bit on Windows 7.
I normally deploy my Python packages on Windows by using the bdist_wininst option of setuptools. This way it is very easy for my colleagues to update a package by just starting the windows installer exe. However since I changed to Python 3.5.2 I get the following error when trying to install a package:
Python version -32 required, which was not found in the registry
For me it seems that the installer is looking for a Python version named "-32" which it cannot find. Did someone come across the same problem or find a solution yet?
It looks like this is a known bug: https://bugs.python.org/issue26630.
The workaround that I discovered is to edit the executable installer manually in a hex-editor. The characters -32 appears in locations 7A5D4-7A5D6. Replace them with all NULL characters. Afterwards, the installer seems to work fine.
Obviously, this is a complete hack. Use at your own risk.
Another workaround I found in 3.6.0 (where bdist_wininst is still broken) was was to use the MSI builder bdist_msi instead.
FYI this is marked as "fixed for 3.5.3, 3.6.1 and default" in https://bugs.python.org/issue26071 (the replacement of https://bugs.python.org/issue26630).

Error when trying to run python 3 (python.exe is not a valid win32 application)

I have python 3.3 on my Desktop and works perfectly fine. I'm trying to install 3.5 on my main laptop I work from, but once it is "successfully installed" (the message the installer always gives me) It doesn't want to open. I get a message saying python.exe is not a valid win32 application. My OS is windows vista.
Go http://www.dependencywalker.com/ and download depends.exe. Run depends.exe and open python exe. If you are lucky it will show you missing dependencies.
Check how to install these. Or post missing dependencies in your question. Maybe someone knows which package to install.
EDIT:
Watch for yellow exclamation/question marks!
EDIT:
Based on eryksun's comment you should install the Vista package from this site: https://support.microsoft.com/en-us/kb/2999226
The problem is that that version of python won't work on your specific version of windows. You are going to have to use python 3.4 as this is the only python 3 version that will work for your os.

Trying to install crc16, not detecting Python

I've got Python 2.7 (64-bit) installed and I'm trying to install crc16. I downloaded the relevant crc16 Python 2.7 installation file:
https://pypi.python.org/pypi/crc16/0.1.1#downloads
When I try and install it, however, it says that I don't have Python 2.7 installed and it doesn't see it in the registry. Looking in my C drive I can see that I absolutely have a folder for Python2.7. Am I having this issue because crc16 is 32-bit? How can I get crc16 to install correctly?
It seems that I missed the part where it had to be compiled. It looks like the developer only made a 32 bit version for Windows. You could try using a 32 bit version of Python
Most likely you need to add the location of the Python executable to your PATH environment variable.
Right click My computer and go to properties
Click Advanced System Settings.
Click Environment Variables.
Append ;C:\python27 to the Path variable.
Restart Command Prompt.
This is based on the answer from Adding Python Path on Windows 7

MySQLdb installation on Windows 7

I am running python 2.7 in windows 7. I'd like to link up to mysql and found MySQLdb. I have tried easy_install mysql-python and found the /Z1 error. Although I downloaded the source, I'd like to avoid having to make all the changes to avoid the Z1 error (due to the source expecting the VC compiler that i don't have). i downloaded the 1.2.4 binary and installed. however, when i start up python and try "import MySQLdb", it does not find it.
i have looked at many pages. i am sure that i am overlooking something obvious, but i am new to python and i've run around in circles at so many pages.
please help.
edit: the installation actually worked. the problem is that i must have installed a 32 bit version. it works fine in IDLE which is using python 2.7.3 32 bit. but i was trying to use ipython and spyder, both were set up as 64.
i tried to install "unofficial version" from http://www.lfd.uci.edu/~gohlke/pythonlibs/ which i got from Python: How to install mysqldb on windows 7 x64?. it claims python 2.7 is not in registry. any help here would be welcome.
I did not solve the /Z1 issue. However, i did determine what i did wrong with the binary install. i had included /python27/LIB/site-packages/MySQLdb only. once i also added /python27/LIB/site-packages/MySQL_python.1.2.4b4-py2.7.egg-info it worked. i did not verify whether i need both in the pythonpath or not. but having both does work.

Python Not Enabled In Vim

I am trying to get the Xdebug vim plugin to work which depends on python. Here is my environment: Windows 7 Professional 64bit, Vim 7.3. I got everything set up for this plugin, but when I hit F5 nothing happens. I found some blogs describing some additional steps to get this working on Windows. All of them stressed making sure the correct version of Python is installed correctly. I looked at the plugin code in the debugger.vim file and close to the top it checks to see if python is available and exits if it is not. I inserted an echo command to tell me if python is not installed, and sure enough a message box pops up informing me of such. Here is the modified code:
if !has("python")
echo 'python NOT loaded'
finish
endif
According to this blog http://phphints.wordpress.com/2008/08/20/add-debug-support-to-vim/ I need to install the version of python that includes the dll vim is looking for when I run the version command from vim. Mine reports:
-DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DDYNAMIC_PYTHON3_DLL=\"python31.dll\"
So I installed the 64 bit version of python 2.7.1. Same result even though python27.dll is in the System 32 folder. I also tried adding the location of python.exe to the PATH, but this did not help. I also tried installing the 64 bit version of python 3.1.3 but this did not help. Any ideas?
I made the following changes, and now python is working (The conditional echo statement is never reached). I uninstalled Vim and re-installed it. I uninstalled the 64 bit versions of Python 2.7.1 and 3.1.3. I installed the 32 bit version of python 2.7.1.
I am guessing the change that made the difference is using the 32 bit version of Python 2.7.1 since I am using the 32 bit version of Vim. What do you think(leave a comment)?
This may not be the direct solution to your problem, but you need to make sure the vim executable compiled with Python support.
You can check what options are compiled by running :version in the vim command line.
Also, as far as I know, python3 support only added after vim7.3. If you have vim7.2, your best bet is to get python 2 working.

Categories

Resources