How do I uninstall python from web platform installer? - python

I've installed python and some other packages using web platform installer, but I was having some issues getting a Django project to work so I uninstalled everything and am trying to get it going from scratch. Web Platform Installer still shows that I have 'Windows Azure SDK for Python" and "Python 2.7 (32-bit)" installed however and I can't mark them as uninstalled.
I don't see where to uninstall from WPI at all, I uninstalled them using control panel. I think I had originally installed python from the python site and had version 3.3 and 2.7 (64-bit), but now there are no entries containing 'python' when I try to uninstall a program from the control panel.
Does anyone know what is going on or can I download the setups from somewhere and try them manually? Is there a way to reset what shows as installed in WPI? I tried uninstalling and reinstalling WPI but that didn't help.

For what it's worth, I just deleted the folder containing the installed PHP versions(5.3,5.4,5.5), which for me was \Program Files (x86)\IIS Express\PHP. Also, I removed "\Program Files (x86)\iis express\php\5.3" from the search path.
When I return to the web installer the 'Add' buttons are enabled.
I opened the options, set the Web Server to IIS, then installed PHP v5.5. It was installed into \Program Files (x86)\PHP\v5.5 and added to the search path.

This is how IIS recommends doing it:
http://forums.iis.net/t/1178803.aspx
Open %userprofile%\documents\iisexpress\config\applicationhost.config file and
1. Find following entry (or similar entry) in applicationhost.config file and comment it or delete it.
Find following entry in hanlders section and comment this as well or delete.
3.By default Web Platform Installer installs PHP to %programfiles%\iis express\php\. so open %programfiles%\iis express\php\ folder and delete the php version folder that you no longer need (don't forget to remove relavant entries from applicationhost.config as mentioned in step 1 and 2 above)
Of course you would need to find the python one instead of php but it is the jist of it

I found a PowerShell script in the WPI directory that checked for python installs and I had to delete the registry keys specified in it.
Let me add some context:
Open the below path,
%LOCALAPPDATA%\Microsoft\Web Platform Installer\installers\PythonDetectInstalls
in the sub-folder of the above path, there is a PowerShell script "DetectPythonInstalls.ps1" which contains two script lines for checking if Python is installed:
$regKey = "hklm:SOFTWARE\Python\PythonCore\$pythonVersion\InstallPath";
$correctRegKey = "hklm:SOFTWARE\Wow6432Node\Python\PythonCore\$pythonVersion\InstallPath";
Uninstall all Python versions you do not neet. However, we need to remove some registry keys manually using "regedit".
(Safety Note: Please take a backup of the registry keys before removing the above-mentioned registry key)
Ref: Social.Tecnet

Related

PYSimpleGUI module not found

I made a program in python which I now wanted to turn into an .exe so that other people at my office, who do not have python or any python skills can use it too. This is not the first time I did this, and I am still working on the same machine, however this time I run into the "module not found" error when trying to execute the exe.
Basically I created a GUI with PySimpleGUI and then followed my own guide from last time, where I created a spec file with pyi-makespec, specifying the paths in which the packages are located. These are two locations: in C:// where python is installed, and in the "venv" folder of my Pycharm project. PYSimpleGUI is located in "venv" but not in "C".
After creating the spec file I create the exe with pyinstaller. It was suggested to use --hidden-import=PySimpleGUI as additional flag, which I did do, but I still got the same error. I also made sure python is added to my PATH, but maybe I did something wrong there? Tha path I used is the one where python is installed: C:\Users\Username\AppData\Local\Programs\Python\Python39\Lib\site-packages is that right?
I am completely stuck and can't find any helpful information. How do I solve this issue? Also important: I do not have admin rights on my computer, so installing stuff is always linked to me having to call the support desk...
If more information about this project is needed, let me know.
Usually, modules not found tend to be the issues with virtual environment. Python uses those venvs as some sort of folders where it stores the Python interpreter and packages installed with pip. If you have an error saying some module is not found, you should either install it on your current environment or switch to the one where ot is already installed. For more details, I recommend you to take a look at this tutorial how to use and setup them.
Additionally, you do not need to compile Python code if you can afford relying on the interpreter installed. If you know your target audience has the interpreter installed (an interpreter is usually shipped with various Linux distributives), then you can just give them your source code or even pycache (.pyc) files that it can interpret as well.
I tried three different things at the same time, one of them seemed to have solved the problem:
1.) update pip with the following commands in the PyCharm Terminal
pip install --upgrade PySimpleGUI
2.) update PySimpleGUI with the following commands in the PyCharm Terminal
C:\Users\Username\AppData\Local\Programs\Python\Python39\python.exe -m pip install --upgrade pip
3.) add python39 to PATH
I checked again and I did have \Python39\Scripts in my PATH, but not \Python39 itself, so I added it. The way to do it on windows is to search for "environment variables" (Umgegungsvariablen in german), edit the "Path" Variable (double click or click and press edit, which opens a new window), then add new Path (mine is C:\Users\Username\AppData\Local\Programs\Python\Python39)
I sort them with Python39 being above Python39\Scripts.
This solved my problem with PySimpleGUI, my program started as expected, but then ran into another missing module error (xlsxwriter not found), which - fair enough - was not imported. (interestingly when running the code in pycharm I didn't need xlsxwriter). I imported it, added it to venv, and when starting the program again, the error showed up even before showing the GUI. I then upgraded xlsxwriter with
pip install --upgrade xlsxwriter
I again created the .spec file and ran pyinstaller to create the exe. This time it worked.
Now I only have issues left which are not connected to missing modules (just variable referenced before assigned).

No Python 3.8 installation was detected

Python installation screenshot
1.i Uninstall everything of python with advance uninstaller . ( register file and ...)
2.i download the last version of Python from python.org
3. i add the Include PATH file when start the installation of Python.
BUT I don't KNOW WHY ITS NOT Installed !
Delete Python3 Folder--> C:\Users\USERNAME\AppData\Local\Programs\python
Control Panel--> Uninstall a Program
Right Click on Python and then Change--->Modify
Click on Repair Python.
and then:
Control Panel --> Uninstall a Program
Now -->uninstall Python
Note: To avoid problems, it is better Delete path Python in edit environment variables windows
Error Code 0x80070643
I found it.
if you are not administrator of the system , and change the location of installation , for example (c:\python) this error will be appear .
so you must be install python on (c:\users\'your username'\App Data\Local\Programs\Python)
and after installation python go to system environment and add the path into this.
For Windows 10 :
First install windows x86-64 executable installer and open it.
Then click on repair and done.
If this occurs while uninstallation :
Do the above steps and then uninstall it.
I accidentally copied the python folder from the installed location into my C drive and encountered this problem. Following steps worked for me.
Run the Python installer (.exe) file
Select the repair option, let it process.
Run the Installer again. This time select uninstall and let it process
Run the Installer again and this time go with the customization option and check the
Add path option also.
open cmd and type python --version, if it displayed python version. You are good to go.
Windows 10.
Had this issue from a while and after a lot of hit & trials, finally resolved it.
Downloaded the Windows troubleshooter.
Removed every application option with Python's name as suffix, and tried uninstalling from Control panel.
It worked. And then I installed the required python version with ease.
Troubleshooter : MicrosoftProgram_Install_and_Uninstall.meta.diagcab
Link to download : https://support.microsoft.com/en-us/topic/fix-problems-that-block-programs-from-being-installed-or-removed-cca7d1b6-65a9-3d98-426b-e9f927e1eb4d
Choose custom installation then next .. your problem will get solve it worked for me.

How to install Python (any version) in Windows when you've no admin privileges?

The "NO ADMIN PRIVILEGES" part is key. I need to install Python but I do not have access to it in order to run the installation in a proper way. I'm also behind a firewall, so the "pip" option is quite limited.
Could you help me figure this out?
From the Python website, download the MSI version of Python you wish to install.
Then open your command prompt and use this command:
msiexec /a python-2.7.10.msi /qb TARGETDIR=C:\python27
Substitute python-2.7.10.msi, if you downloaded Python 3 and adjust your TARGETDIR to where you want it to go.
The /qb flag will give you a small dialog progress bar.
I downloaded embeddable zip file from the site. Extracted it to the folder of my choice. Then added that folder in the windows path variable (using setx). It worked for me. Well this install only python and not the other packages like pip etc.
Later I found better and simpler way with Python 3.7.0 version for windows.
Download windows installer exe.
Run the exe.
Screen will be shown to chose the installation option.
Uncheck "install for all users" option.
Go for the custom installation.
On next screen specify the directory path for which your user have
full access on the computer.
Uncheck "create shortcuts for installed application" option.
Make sure "Add python to environment variable" option is Unchecked .
complete the installation.
Add the installation and Script folder path in PATH using setx
This has installed all the default components of python
As the comment states: "uncheck '[Install launcher] for all users'"..
I suggest you use Anaconda (open source edition).
Anaconda is a completely free Python distribution (including for
commercial use and redistribution). It includes more than 300 of the
most popular Python packages for science, math, engineering, and data
analysis.
One great feature of Anaconda is that it installs to your home folder, to which you should have write access.
It ships with a conda script that let's you install packages too.
Keep in mind that you will not be able to add it to the System PATH, though you can try to add it to your user PATH. If you can not add it to either, you will have to manually specify the full path to the python executable to run scripts from the command line.
I would suggest you try using Anaconda. It can be installed to a local user folder without requiring admin permissions.
With this, you also get a quite nice package management conda.
Uncheck 'Install for all user' when the installation starts. Rest will be taken care by Python-3.
I'm using Python-3.7.6 with this method.
This installation method will automatically updates current user's path for Python. But the application name will be py instead of python. The user has to handle environment variables if he wants to use pip or python commands.
As mentioned earlier here, use Anaconda. The default installation process does not require Windows Admin privileges. It comes with nice package management (that might not work if you are sitting behind corporate firewalls).
With Windows 2010 edition May 2019, you won't have to execute a msi setup or download an Anaconda edition or go to the python website.
Windows has a python.exe and python3.exe already pre-installed
those commands will get you directly to the Microsoft Store!
Example: Python 3.9, which installs python and puts python on the path for the current user. So, no need for admin privileges.
There is a discussion about this on the Talk Python To ME podcast #191 with Steve Dower from Dec. 2018.
See more at "Who put Python in the Windows 10 May 2019 Update?" from the same Steve Dower (also on Stack Overflow):
This version of Python is fully maintained by the community, installs easily on Windows 10, and automatically makes common commands such as python, pip and idle available (as well as equivalents with version numbers python3 and python3.7, for all the commands, just like on Linux).

I installed Python 3.4.3 over 3.4.2 on Windows 7... and now I cannot uninstall Python

I installed Python 3.4.3 over 3.4.2 on Windows 7 and got problems with IDLE not starting.
When I use the Windows uninstaller via the control panel I get the message:
"There is a problem with this Windows Installer package a program required for this install to complete could not be run. Contact your support personnel or package vendor."
If I try to remove Python via the msi file then I get the same message.
There is no Python34 directory on my machine. I noticed that there is an entry in the registry HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.4\Modules. I didn't want to mess with my registry, but can I safely delete this entry? Is there any more to delete?
I used MicrosoftFixit.ProgramInstallUninstall and I was able to remove Python34 and then it reinstalled without any problems.
Had a similar problem. This is what I did:
Restart computer (kill any running processes of Python)
Delete the main Python folder under C drive.
Using CCleaner (or a similar application), use the Tools -> Uninstall feature to remove Python (if it is still there after deleting the folder)
Then go to the Registry window in CCleaner and clean the registry. Python should now be completely gone from your computer.

How do I update my version of Django?

I currently have it installed and it's running a website.
http://www.djangoproject.com/download/
This is the new version. How do I upgrade it? (How do I install the new version over my current one?)
read about this in :
http://docs.djangoproject.com/en/dev/topics/install/
For installing Django to be able to update to the latest code in trunk:
If you'd like to be able to update
your Django code occasionally with the
latest bug fixes and improvements,
follow these instructions:
1.Make sure that you have Subversion installed, and that you can run its
commands from a shell. (Enter svn help
at a shell prompt to test this.)
2.Check out Django's main development branch (the 'trunk') like so:
svn co
http://code.djangoproject.com/svn/django/trunk/
django-trunk
3.Next, make sure that the Python interpreter can load Django's code.
There are various ways of
accomplishing this. One of the most
convenient, on Linux, Mac OSX or other
Unix-like systems, is to use a
symbolic link:
ln -s pwd/django-trunk/django
SITE-PACKAGES-DIR/django (In the above
line, change SITE-PACKAGES-DIR to
match the location of your system's
site-packages directory, as explained
in the "Where are my site-packages
stored?" section above.)
Alternatively, you can define your
PYTHONPATH environment variable so
that it includes the django-trunk
directory. This is perhaps the most
convenient solution on Windows
systems, which don't support symbolic
links. (Environment variables can be
defined on Windows systems from the
Control Panel.)
What about Apache and mod_python?
If you take the approach of setting
PYTHONPATH, you'll need to remember to
do the same thing in your Apache
configuration once you deploy your
production site. Do this by setting
PythonPath in your Apache
configuration file.
More information about deployment is
available, of course, in our How to
use Django with mod_python
documentation.
4.On Unix-like systems, create a symbolic link to the file
django-trunk/django/bin/django-admin.py
in a directory on your system path,
such as /usr/local/bin. For example:
ln -s
pwd/django-trunk/django/bin/django-admin.py
/usr/local/bin This simply lets you
type django-admin.py from within any
directory, rather than having to
qualify the command with the full path
to the file.
On Windows systems, the same result
can be achieved by copying the file
django-trunk/django/bin/django-admin.py
to somewhere on your system path, for
example C:\Python24\Scripts.
You don't have to run python setup.py
install, because you've already
carried out the equivalent actions in
steps 3 and 4.
When you want to update your copy of
the Django source code, just run the
command svn update from within the
django-trunk directory. When you do
this, Subversion will automatically
download any changes
For updating Django from stable release to another stable release:
If you are upgrading your installation of Django from a previous
version, you will need to uninstall the old Django version before
installing the new version.
If you installed Django using setup.py install, uninstalling is as
simple as deleting the django directory from your Python
site-packages.
If you installed Django from a Python egg, remove the Django .egg
file, and remove the reference to the egg in the file named
easy-install.pth. This file should also be located in your
site-packages directory.
First of all, don't. Install/upgrade it on your staging server first and test your app to make sure that it still works. Only after complete testing should you cut over to the new version on your production website.

Categories

Resources