I've been struggling with getting wxPython work - I'm running a Mac, OSX 10.11.6 El Captain, so the pip install runs into /src/osx/cocoa/mediactrl.mm:52:10: fatal error: 'QTKit/QTKit.h' file not found with the new XCode, and some changes there, and won't compile. So I found an installer, that at least gets it done.
But then wx runs (I only tried to import it in fact) in my conda python 2.7.12.
My goal is to be able to play around with TensorKart and since my default python is conda, when attempting to run the repo, it tells me the usual:
This program needs access to the screen.
Please run with a Framework build of python, and only when you are
logged in on the main display of your Mac.
I found how George Reilly explains here what to do, but I cannot find the wxredirect.pth and don't know what to do with the bash script. I only have wx.pth within the conda site-packages.
So is it somehow possible to get the wxPython for my Framework 2.7.10 with the .dmg installer? After 6 hours of struggle it seems like the easiest way.
I tried:
copy conda site-packages having to do with wxPython into site-packages within a virtualenv created form the Framework Python as it was in the original G. Reilly's post which no longer works.
create alias in .bash_profile that python is the Framework version but it didn't help.
Thanks a lot!
Related
I started to learn Python and got stuck on my own language (I'm not English Native Speaker), main user folder name was by kirilitsa.
It cause trouble with installing new elements to Python. I changed name and now console don't see Python, I tried to reinstall manual and from Control panel but still it somehow exist in my pc and I can't repair, modify or uninstall it.
I think there is a path which lead to old version of folder name but I can't even imagine where it can be.
Is there any solution or to reinstall windows will be faster?
It shows right way but...:
Changed path:
From the Official Docs.
Do this
Modifying an Existing Installation:
Re-run your installer (e.g. in Downloads, python-3.8.4.exe) and Select "Modify".
Check all the optional features you want (likely no changes), then click [Next]. Check [x] "Add Python to environment variables", and [Install].
UPDATE
NOTE:
I see that from screenshot you are installing the 64-bit Python, what version is your Window?
if is 32-bit then just go here and get the 32 bit (32 bit here)
Run Installer as Amministrator
Have Windows “Run” dialog run as Admin?
How To Run Programs As Administrator In Windows 10
If you still get an error, go manually to your folder, as per screenshot the path should be:
C:\Users\Timur\AppData\Local\Programs\Python\
Follow this instruction
How to add to the PYTHONPATH in Windows, so it finds my modules/packages?
Add
C:\Users\Timur\AppData\Local\Programs\Python\Python39\
And
C:\Users\Timur\AppData\Local\Programs\Python\Python39\Scripts\
5 months later I'm found how to fix the problem.
After several wrong deletion of Python 3.9.1 which screwd up things there still was some in system installer, like this but 3.9.1 version:
You need to kill them all before u could install new version or update. Good proggram which I used: Reg Organizer.
Install it, open important sections registry, find all python 3.9.1 or version you have problem with and delete:
Done! Worked with me.
I too deleted python by mistake and found that I was unable to uninstall or reinstall. When I launched the python installer, the only options I could choose from were - Modify, Repair, Uninstall. Neither modify nor uninstall worked since I got the same message 'No Python 3.9 installation was detected'.
It was perfectly solved using Repair option. I then chose to uninstall completely and reinstall. It would probably also be a good idea to check the environment variable 'Path' and also Registry Editor to make sure there is nothing left over from the previous installation.
I have uninstalled Python and now I cant install it anymore (error 0x800705b4). Has anybody encountered this error ? I have tried different versions but nothing works.
You can try Anaconda for Windows which has seperate environments.
The solution I would recommend though is to use WinPython, which after install is just a folder with everything you need, doesn't change a thing in your windows environment and still works great! There is also a version that comes with the most used packages already installed, give it a try!
No need to mess with environments, just use a different WinPython folder for your projects!
Got the same error after a little digging I found the below thing...It works like a charm...
First...Make sure to check the setup package for your system which is X86 or x64, download packages based on the system before you proceed, otherwise, the hack won't work. The below is explained for x64 bit windows 8.1 system with a 64 bit Python setup package use the below-mentioned setup name(.exe file) in Step1: and search in google for downloading the Python setup
Start CMD as Admin, after that
Step1: ~YourFilePath/python-3.5.0-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0
Step2:
~YourFilePath/python-3.5.0-amd64.exe
~YourFilePath stands for the location of the python-3.5.0-amd64.exe file on your PC Example: E:\Softwares\python-3.5.0-amd64.exe
now after executing Step2: the setup will run without any errors..... Cool...
The above-mentioned steps should work or else If you find any difficulties please visit here which explains the process in detail. Good Luck...
Credits to this answer
Eventually what did the trick for me was to roll back the previous microsoft update (KB4512575)
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.
I am sure on my Mac 0SX 10.9 I have more than one version of Python 2.7.5.
When I type in
which python
in the terminal, I get /Library/Frameworks/Python.framework/Versions/2.7/bin/python
When I am doing a pip.install it seems those are loading in a different path, they are all under /Library/Python/2.7/site-packages.
When I am in IDLE or my IDE (Sypder) and type
import sys
print sys.path
I get lots and lots of paths that start with /Library/Python/2.7/site-packages.
My problem is when I do a help() or import() on one of the modules I can see in /Library/Python/2.7/site-packages, I get a NameError: name 'Module' is not defined. Examples that I can see loaded in .../site.packages are pandas, nympy, and PyMySQL. But all give me "name of module not found".
Ideal python distribution control on a Mac: use a (free) scientific python environment like Enthought or Anaconda, and use either the real virtualenv package or the provided virtualenv package to control 'virtual environments' in which you can install packages. Virtualenvs really help keep the python distribution clean.
Good Luck.
Python development on a Mac can be a pain in the butt. That's why I set up a Arch Linux through Virtual Box and I'm quite happy with it. However, iOS development with Python using Kivy requires XCode (as far as I know) to deploy the apps on the iOS devices. So I'm in the same boot as you are.
Long story short: Running brew doctor (as in homebrew) in the terminal helped me a lot cleaning up my Python installations on the Mac.