Having installed Python 2.7 from here:
https://www.python.org/downloads/release/python-279/
I then uninstalled it using the control panel (I have Windows 7 pro). Now Python 2.7 no longer appears in the list of installed programs, however the files are still sitting in the same place on the C: drive.
I have since installed version 2.6 but I seem to be having some clashing issues between the versions. I'm having similar issues to this guy:
How to completely remove Python from a Windows machine?
I just want to know how can I remove Python 2.7 completely?
Will simply deleting the folders from my C: drive be sufficient?
How can I test that it has been completely removed?
You should just be able to delete the local files if you've already uninstalled from control panel. Also be sure to go to your environment variables and make sure that the python 2.7 directory isn't there. To do that,
Go to the start menu and right click on Computer
Click on Properties
Advanced system settings
Environment Variables and look for "path" under system variables
Be sure to erase C:\...\Python2.7.x
If you uninstalled from control panel it might not be there but it's probably good to double check. Also, be sure to delete the ; before C:\...\Python2.7.x
I had a similar problem. I kept installing Python 3.6 but when I typed "python" from the command prompt, Python 2.7 kept opening up despite the fact that I had uninstalled and it wasn't in my Path or in my Programs folder. I eventually solved the problem by uninstalling Enthought/Canopy from my computer and also erasing all the related files. Now I have a regular installation of Python 3.6 working and accessible from the command prompt. I assume I could now also get a parallel python 2.7 going, but I haven't tried to since I have no need for it at the moment.
The giveaway for me that my python 2.7 installation was strange was that when I typed:
python --version
into the command prompt, I was getting the following:
Python 2.7.6 -- CUSTOM
Related
I'm working on a project in a python virtual environment, the project was started on a pc with python 3.8 installed and consequently python 3.8 was used in the virtual environment, or I had the need to continue the project on another pc, so I loaded all on GitHub, in the end I downloaded it to another PC with python 3.11 installed, the files are all there but when I try, inside the virtual environment, to open python by writing python or python3 in the terminal, it shows up this error: Python not found; Run with no arguments to install from the Microsoft Store or disable the link from Settings > Manage apps Run aliases. I then tried to see if it only showed up inside the virtual environment, but the same thing happens outside as well.
I tried to do various things among those suggested in other forums but they didn't work, the problem persists, I'm a bit lost, it's the first time this has happened to me.
Sorry to bother, maybe it's the simplest problem there is to solve but I don't know where to start
Trhanks
The problem is the different version of python on the two computers... the content of the pyvenv.cfg file must simply be changed which, when creating the virtual environment, is based on the installed version. Here you just need to change the path to reach the python.exe file installed on your computer and then change its version by inserting the correct one.
I cloned a python environment and recreated it on a new machine using Anaconda Navigator with a yml file. My script runs fine in the new environment using PyCharm. The python version of this environment is 3.9.0. However the script doesn't run with IDLE because IDLE is running version 3.11.0.
IDLE is located at:
C:\ProgramData\Anaconda3\envs\CloneETL3\Lib\idlelib\idle.pat
The python interpreter which PyCharm uses is located at
C:\ProgramData\Anaconda3\envs\CloneETL3\python.exe
How can IDLE have a different version from the python interpreter when they were just installed fresh? How can I prevent multiple versions of python from running on my machine? I made sure to create a new project in PyCharm, use an existing interpreter using conda and point it to the exe I described above.
The environment was first created from a clone of my ArcGIS Pro environment.
Thanks for the help!
This is quite common in most editors. I use vscode which is similar to pycharm and the user can select the version of python (or other languages) that they wish to run.
It look like this:
The reason for this is that some users have the requirement of being compatible with previous versions. You should be able to select the latest version of each.
Alternatively you can delete all versions leaving only the one version that you desire, this would avoid confusion...
You could refer to this answer for that option: How to completely remove Python from a Windows machine?
This question already has answers here:
CMD opens Windows Store when I type 'python'
(12 answers)
Closed 2 years ago.
I have a bit of a oddity going on I can't figure out why it's happening. I've installed the latest version of Python for Windows (3.8.5 64-bit), after removing the previous version, and the version which comes with Visual Studio as part of the Python development package in that IDE. Python installed fine, and also added the Environment variables which I activated in the installer. Now I opened the PowerShell to start the Python interpreter as I've done so often before, typed in python, and Windows 10 opened up the Windows store to suggest to install Python from the store... so, I made sure another time that Python installed the environment variables which it did.
I uninstalled and re-installed Python several times then, also rebooting the computer a few times inbetween, to make sure it could read the changed environment variables. No luck. After browsing the net for some times, I came across a post here which suggested to start the interpreter via the "py" command. Et voilá, it works...
Did they change something in one of the latest versions of Python in regards of the command to start the interpreter? I frankly have no idea what is going on here... starting it via "python" ALWAYS worked, with every former version of Python.
You said you uninstall your previous version of Python, but in your environment variables, are you sure you just have 1 link to python.exe ? Maybe you've got an other path that doesn't work and your command can't execute well.
I am trying to use the "platformio-ide-terminal" package in Atom, on macOS, to open terminals within Atom.
The issue is, the terminal in Atom does not use my Anaconda Python, and thus does not have access to packages I installed using Anaconda. Typing
which python
returns
/usr/bin/python
in platformio-ide-terminal and
/Users/.../anaconda3/bin/python
in the terminal.
Typing
which python3
in platformio-ide-terminal returns
/Users/.../anaconda3/bin/python3
I am very troubled about all these different Pythons coexisting on my computer, and a general explanation about how this works would also be very welcome.
I would also like to use the same version of Python in Atom. How can I do this?
I solved it by using IDEs rather than text editors. Pycharm offers a lot of clarity on the version of Python you are using: you can choose the exact directory with the version of Python you want to use (by setting an interpreter), and then run / debug the project from Pycharm using this version of Python. Then, I deleted other directories with unused versions of Python to save the space.
I need to install Canopy, but I have Anaconda already installed. If I install Canopy will there be conflict or not? an if will be what are the possible problems?
Multiple Python installations can co-exist on a system, but it is important to keep them isolated (none should be set as default or referenced in any environment variable).
Canopy will not set these at all, so will not interfere with Anaconda. You can run Canopy Python scripts from inside Canopy. If you want to run them from a Terminal / Command Prompt, you can open it from the Canopy Tools menu.
To avoid possible interference of Anaconda with Canopy, please modify your PATH or PYTHONPATH environment variable to remove any references to Anaconda or any other Python installation using the instructions in this article as a guide (note that in this case you would be removing Python from this variable).
You may wish to write a small batch file or shell script to re-insert any such references temporarily when you do want to run anaconda.
I have not used Canopy but use system installed Python and Anaconda a lot so I can explain some issues people run into. When you have 2 different python installations there will be a problem of which Python is used(Type python at the command prompt and which one opens the interpreter?). Usually the executable Python location is added to the PATH so if 2 are in your PATH it will use the first one. With this you will likely have a mess with environments. If you go to use Canopy's Python you will not access Anaconda's Python packages and vice versa.
Other weird issues can come up if one python package picks up a .so or .dylib file that doesn't work or isn't the specific version. One installation may remove a version of these in favor of it's dependent version and then another piece of code no longer works.