Having some problems with Gdal installation with python 2.7 on Windows 7 32bit. I am running MSVC 2010. I have followed the instruction from the blog website
http://cartometric.com/blog/2011/10/17/install-gdal-on-windows/
The installation is fine. At the end of it, I am able to run ogr2ogr in the MS-DOS and have gotten the similar screen as listed in the blog.
However, when I am trying to use the command "import osgeo" on the Python IDLE GUI shell. A series of error message is released, reading like the following
"DLL error:.........."
I believe that this might mean that the python binding is of wrong version. I have cleared up my installation by removing the following: Python-Gdal binding, Gdal, Python 2.7
After removing them, I have retried my installation with Python 3.2.3 instead and loaded the Gdal package and python binding accordingly. However, the same error returns.
Is there any intermediate steps that I could take to verify the installation. Any other advice I could have to have the bindings installed? Or is my reinstallation method correct?
I have tried to install FWTools too. It doesnt seem to work either. I have run the Python shell from EV-shell and type in "import osgeo". Have gotten the message "no module exist...."
Thanks
Get the precompiled gdal from here:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal
I have some other notes on setting up postgres and postgis 2.0 here if you need it:
http://monkut.webfactional.com/blog/archive/2012/5/2/using-django-14-with-gdal-19-and-postgis-20/
Related
I'm actually using Python for an audio steganography project but I have some troubles.
I searched this error code on the forum, but I found things about SQL installations and not Python.
I'm trying to re-install Python 3.6.5 after an uninstall, because of a bug with pip.
I installed Python 2.7, Python 3.6.5, Python with VS 2017, before uninstall it because it wasn't working.
However, when I'm runing the installer as an administrator, hit "customize installation", tick everything excpet "balblalblabal (this requires VS 2015 or later)", and click on "install", it tells me that :
.
I realy need Python to work and I'm now stuck ...
If anybody here could help me, it would be nice !
Thanks all,
maleik.
PS : I have the log for you :*
The log link
I found this in the log file which you have attached. Try cleaning the registry with CC cleaner and give it a try. If it still doesn't work, try installing python with web installer Python Web Installed 3.6.5.
[3DA0:2968][2018-12-05T20:46:18]e000: Error 0x80070643: Failed to install MSI package.
[3DA0:2968][2018-12-05T20:46:18]e000: Error 0x80070643: Failed to execute MSI package.
[2610:03A4][2018-12-05T20:46:18]e000: Error 0x80070643: Failed to configure per-machine MSI package.
[2610:03A4][2018-12-05T20:46:18]i319: Applied execute package: core_AllUsers, result: 0x80070643, restart: None
[2610:03A4][2018-12-05T20:46:18]e000: Error 0x80070643: Failed to execute MSI package
I installed python from Microsoft store after facing this problem and it magically got installed without any error as it may have directly been installed. I don't know but try if it eorks for you too.
You need to run the installation as a local administrator.
I had the same problem installing Python version 3.9 for the first time on my Windows 10, as this same problem happens to many users trying to install Python, the best solution I accidentally, just like #MANAN AGGARWAL discovered trying to check if I already had a version of Python installed on my computer by the DOS Command Prompt, was:
Open the DOS Command Prompt (cmd) and dictate "python": if a screen shows you a version, it's clearly not the first time you've installed Python, so if you want to upgrade you should try: https: / /www.delftstack.com/en/howto/python/how-to-update-python/ But if you've never installed any version of Python, the solution lies in updating your operating system to the latest version through Windows Update, and open the command prompt and type Python, or go directly to the Microsoft Store and search for Python followed by its latest version. It works without error.
** If by chance it does not automatically install on your PC after downloading, click "install on my devices" and select your computer name.
Why can't I install Python directly from the website file? Please note that when trying to install any software/applications from outside Microsoft's trusted locations, there are high chances of user settings interfering with the installation. When coming, for example, from the Microsoft Store, a chance of success is much greater, even without having problems related to User Permission Settings.
Another important thing to point out here is that installing a lot of software from outside Microsoft's trusted platforms can cause you to change some user permissions which can have positive effects with some software and negative effects with others, even with security your own system if you don't know what you're doing.
it's simple , Try Lower Version Like 'Python 3.6' but Download web install.
install it , then install last python version.
your python will update.
I've faced same/similar problem with installing Python 3.9.12 in a clean Windows 8.1 64-bit (VirtualBoxed test environment).
I thought the issue could have been fixed in a newer version of Python, but the freshest 3.10.10 fails with same issue.
The original log isn't available any longer, but luckily it is quoted in another answer, and the following line reveals the real problem:
Applied execute package: core_AllUsers, result: 0x80070643, restart: None
My log looks the same, and if you scroll the log up, you'll discover that core_AllUsers is a UCRT MSI-installer, which is downloaded from Python site (for 3.10.10 64-bit the link may look like https://www.python.org/ftp/python/3.10.10/amd64/ucrt.msi).
If you download it manually (Python installer is smart enough to do a cleanup even if it fails, so you won't find this MSI in a local cache) and run, it will probably crash. And if it is your case, I have a simple solution - just install update KB2999226 (Update for Universal C Runtime) for your OS, which you can download from Microsoft.
I also faced the similar issue. What the trick worked for me is I installed it for the individual user (as earlier installation was for the all users).
So earlier if one has installed it for the all users then install it for the specific user and vice versa.
I know this is not the resolution of the error faced. However, this approach will install Python which is the main motive to achieve.
I encountered the same issue after installing a fresh Windows 8.1 on my PC.
I solved that by using the Python v3.9 web installation file which you can find here.
However, you can choose any other version that has a web installation file
Note: You need internet connection to use this method.
I am trying to install cx_Freeze==5.0.2 on Windows 8.1 / Python 3.7 but I am getting this Error:
I do not know what exactly cx_Freeze is for or why i need this version - it is from a requirements text file that threw and error, and this module is the only one that i could not install manually.
It says something about Visual C++ above, but I do have it installed, so I dont know why its saying that.
cx_Feeze needs compiling to run (this is usually done for you on Windows but it has not been done for 3.7 yet (see the releases on PyPi) so you have two options:
Wait until it is (shouldn't be more than a few days/weeks, it wasn't last time python updated in any case)
Compile it yourself
In the case of compiling, if you have VS installed then you probably have not set the correct environment variables
SET DISTUTILS_USE_SDK=1
SET MSSdk=1
Taken from here.
I would recomend the answers in this question over the duplicate suggested above.
I have just installed the latest version of Python 3.6.5 from python.org. I am using 64 bit Windows 8.1 .Earlier it was showing all kinds of .DLL errors, I tried installing all the updates and C++ Redistributable but nothing happened, then I manually downloaded all different DLL's and pasted them in the System-32 folder. By doing that the python command shell did start working but as soon as I try to open the IDLE, nothing happens, no error message is shown and nothing pops up on the monitor.
I read a lot of answers on the net and when I tried writing "import tkinter" in the python command shell it shows that the module not found and this message also - " import _tkinter # If this fails your python may not be configured for Tk" .
Please resolve this issue.
If you did not have the C runtime (CRT...) .dll MS Visual C++ applications compiled with VS2015 or VS2017, including Python since 3.5, it is very likely because you turned off automatic Windows updates. If you got interactive Python working, you must have gotten the right one installed.
If _tkinter is not installed, it must be because the box for optionally installing tcl/tk, _tkinter, tkinter, and IDLE was not checked when you said 'install'. If you still have the installation file where it was when you ran it, you can go to the Control Panel installed programs dialog, click on 3.6.5, and ask to 'Repair'. You should be able to add the needed checkmark. Otherwise rerun or redownload the file from python.org.
If you need further help with installation questions, the python.org python-list is sometimes a better forum.
I am trying to reinstall Python, so I go control panel > uninstall > Python 3.6.2. It succeeds, but when I try to download 3.6.*, it says that I can't download because there is already a version of Python3 installed.
I tried to clean the registry, deleted all files named "Python", but still see the error. I even deleted the path Python in PATH.
This may be a silly solution, but for me the issue was the Python Launcher still listed in the apps list after the uninstall. Uninstalled it separately, afterwards reinstalled Python without the error.
The installer/uninstaller does not do a good job of cleaning up after itself (and that's being generous). What worked for me:
Remove all python binary folders from Program Files and Users\<username>\AppData
Clean the PATH of any and all mentions of python
Search the registry in Computer\HKEY_CLASSES_ROOT\Installer\Features for any values with python, then delete the containing key. The key names are things like "03CEBFB8CC334B3148F9B330F67264A6" (that's an example, not an actual one, since the actuals I deleted)
#3 is the one that actually got it past the hurdle, but #1 and #2 should be done anyway.
My issue persisted despite all the above. If you're still having issues:
I realized the Python installer shows a log file link... wish I had noticed it sooner. Click to open that log, search for "Detected". Find all lines with "Detected related package". These lines are specifically what's tripping the installer. Notice the version numbers are higher than the version you're installing, along with the "Operation: Downgrade"s).
Once you find these GUIDs in your log, you'll need to search each of them in the registry. I use a free registry tool called Resplendence Registry Registrar Manager (I have no connection with them), which searches the registry blazingly fast and will show everywhere it finds something. But you can also just use Windows' native RegEdit, as well.
When you find one of these GUIDs in the registry, rename the key by adding an underscore to it, like below. This is the equivalent of "deleting" them -- as far as the Python installer can tell -- but without actually deleting them. You can easily revert them if needed.
Re-run the Python installer and it should now install just fine.
Delete all the files of the old version python and try to re-install to uninstall the older version you can do it from control panel
Install another version. For example, if you are installing a 64-bit installation, then try to install 32-bit.
Download zip file from below URL.
https://www.python.org/ftp/python/3.6.0/python-3.6.0-embed-amd64.zip
Copy all the contents to the python folder which is registered in the environment.
I managed to fix all this Python cringe by doing this:
Download newest version of Python for your version after the first point. In this case it's Python 3.6, so I downloaded the latest available - 3.6.8:
https://www.python.org/downloads/release/python-368/
Run it.
Check the checkbox "Add Python to Path":
Press on the Custom Installation button:
Press Next:
Install:
It should install. Now go to Control Panel\Programs\Programs and Features, press RMB and uninstall:
Now run your wanted Python 3.6.X installation again.
If it still gives you the "A newer version of the Python launcher is already installed", run the latest installer again as in all the previous steps, but instead, check the "Install for All Users" checkbox:
Then uninstall this latest version again.
And then install your wanted Python 3.6.X installation again.
I'm throwing hands in the air, personally
I had to do it just now for 3.6, 3.7, 3.8, 3.9 and 3.10 versions because I had problems with uninstalling and installing with errors "no python installation was detected" and "A newer version of the Python launcher is already installed". Why do I have all these different versions of Python? Because different programs want different versions of Python installed and refuse to work with any other(lmao).
World would be a better place without Python.
For me, the solution to the problem (a newer version of the python launcher is already installed) was to install it via the web installer from the website (https://www.python.org/downloads/windows/)
Download the Windows x86-64 web installer. The installer took for his series (3.7). Oddly enough, it worked the first time. Previously, the registry was cleaned, and the removal of possible traces of the program - all to no avail.
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.