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.
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 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.
This question already has answers here:
Dealing with multiple Python versions and PIP?
(28 answers)
Closed 5 years ago.
I've installed django using the pip command (pip install Django), but i can't run it using the py command, as it can't find the module.
I can only make it works using 'python' command.
Here is a summary of the screenshot I have atttached
$ python --version
Python 3.6.1
$ py --version
Python 3.6.0
It also looks like django works only with 3.6.1.
Is there any way to set both commands to run newest version of python?
Screenshot:
You're using Python launcher for Windows when you executepy. You could be specific about which Python interpreter version that you want py to execute with this command:
> py -3.6
See this section from PEP 397:
Python Version Qualifiers
If no version qualifiers are found in a command, the environment
variable PY_PYTHON can be set to specify the default version qualifier
- the default value is "2". Note this value could specify just a major version (e.g. "2") or a major.minor qualifier (e.g. "2.6"), or even
major.minor-32.
If no minor version qualifiers are found, the environment variable
PY_PYTHON{major} (where {major} is the current major version qualifier
as determined above) can be set to specify the full version. If no
such option is found, the launcher will enumerate the installed Python
versions and use the latest minor release found for the major version,
which is likely, although not guaranteed, to be the most recently
installed version in that family.
In addition to environment variables, the same settings can be
configured in the .INI file used by the launcher. The section in the
INI file is called [defaults] and the key name will be the same as the
environment variables without the leading PY_ prefix (and note that
the key names in the INI file are case insensitive.) The contents of
an environment variable will override things specified in the INI
file.
Plus Python launcher isn't just limited to launching different Python versions, it also parses shebang #! in source code files, providing a functionality similar to that in *nix operating systems in Windows.
*Refer to Python Launcher for Windows documentation.
On windows, py is an executable stored in the C:\Windows folder. I honestly don't know what it contains, as I am used to where it is a symbolic link on linux, and my windows install shows the normal python executable as being a fraction of the size of py, despite my being quite sure that they point to the same installation. Regardless, you can fix your problem by deleting or renaming (python.bak, etc) the executable you don't want to keep using from the Windows folder, then copying the one you want in place and renaming it to the same name that you previously deleted or renamed. I can't imagine this is the official way to fix this problem, but this will work. Also, in the future, feel free to specify the version you are installing to with pip explicitly if you want to be sure of which installation you are using instead of just running whatever points to pip:
py -m pip install packagename
python -m pip install packagename
Running into problems with multiple python versions on the same system is quite common with Windows, so setting up a virtual environment may be beneficial. This is explained in the Django Windows install how-to.
I have been trying to get SCons working now for quite a time, but didn't succeed yet. Before everything else: I'm running Windows 7 x64.
I have firstly installed Python 2.7.11 in C:\Software\Python27 and added both that directory as C:\Software\Python\Scripts to
the system path (for all users, that is). Then I installed SCons in C:\Software\Python27\Lib\site-packages\scons-2.4.1, and
the scripts in the previous mentioned scripts-directory (the directories which the SCons installation msi defaults to).
And now when I try to run SCons I get this error message:
Import failed. Unable to find SCons files in:
...
ImportError: No module named SCons.Script
As a user I really don't have any idea where the error comes from, other than that SCons can't resolve it's own imports.
I got it working by creating though by creating a new folder: C:\Software\Python27\Scripts\scons-local and moving the
contents of the SCons installation folder (...\Python27\Lib\site-packages\scons-2.4.1) to the newly created folder. But this
gives me a syntax error:
I found here that this error is due to my Python version not supporting conditional expressions, because this kind of
expressions are supported from Python 2.4 and higher. The thing is though that I am using Python 2.7.11, and thus I shouldn't get
this error.
Some help would be highly appreciated, thanks in advance!
The windows installer is no longer supported.
The best way to install SCons is now via pip
so:
python -Mpip install SCons
Note you will need Python 3.5 or newer (though at this point I'd suggest 3.10 or newer)
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/