Lately when I typed "python" in Terminal i saw that much python versions:
That much options
I wanted only 3.8 installed so I'm trying to uninstall everything else
I had these 2 paths where python was installed:
/Library/Frameworks/Python.framework/Versions (3.4, 3.5, 3.8)
/Library/Python (2.7)
In my Application directory I have only Python 3.8, so i moved 3.4 and 3.5 folders to Trash
Then the list of version became smaller
Only 2.7 and 3.8 Python left
When I move /Library/Python (2.7) nothing seems to happen, I continue to see 2.7 in Terminal
So the question is: how do I remove Python 2.7?
Related
I have installed the latest version of IBM SPSS Statistics(Version 26) which has pre installed python 3.4 and 2.7. i am trying to use version 3.4 python. i am able to import modules like pip , sys , os etc. i tried pandas the same way. i am unable to do so. getting error no module found. Hence going through our forum and IBM support did the following changes.
received the following error
1) tried pointing the site-packages via
import sys
# Assuming windows and standard python folder here.
sys.path.append(r"D:\Python34\Lib\site-packages")
2) changed the path in the settings of SPSS
3) Tried installing pip in the below folder as suggested in the forum but got message i have already installed the updated version.
C:\Program Files\IBM\SPSS\Statistics\Subscription\Python3
4) following versions of python were installed
have tried what i could. Need your expertise help to fix the same which will help me to install/use modules needed for SPSS. Thanks.
This is going to be painful to explain, I'll do my best.
As far as I can tell, you're on windows. Usually when we need a new package, we just open cmd and type pip install xxx (assume you added python to path when installing it). The reason that this works, is because when you type pip install xxx in cmd, windows recognize pip to be a command because python path is in system variables. Windows know that I can execute pip install with this python path.
However for SPSS python (3.4), that python had a different path in the system. Thus when you only have the 3.7 or 3.8 python in path, windows cannot install package to you 3.4 python, and I'm not sure if you can have more than one python path in system.
In order to fix this, you need to first figure out what's the path to your 3.4 python, then in this page you can follow the instruction to remove your 3.7 or 3.8 python in path, and add your 3.4 path, then you can do pip install xxxx for whatever package you want
I did the same thing with a arcgis python distribution, hope this works for you. If the attached page does not work, just google add python path to windows and look for a instruction that works on you PC
Oh and the reason that you can import pip, sys and some other package but not pandas, is because python is 'battery included', it comes with tons of packages pre-installed for additional functionality, but pandas is not one of them.
Fixed it since my ananconda had version 3.7 .i created virtual environment and installed 2.7 python with anaconda package. Pointed SPSS to the 2.7 folder and was able to import pandas.
Having several exe's of Python, I would like to specify the command (py or python) to launch a certain version from the command line.
At the moment, I have different versions of Python (2.7, 3.6, 3.7 Anaconda) installed on my Windows machines (7 at work, 10 at home). Unfortunately, the commands in the cmd-prompt are not the same.
The output of the following cmd commands is as follows:
py -> 3.7.1 of Anaconda (work) and 3.7.0 (home)
python -> 2.7.13 (work) and 3.6.2 (home)
pyton2 -> not recognized (work) and 2.7.15 (home)
How can I order the variables, so the same commands call the same version of python? Researching about the path variable I could not find how to define the command that launches a specific python.exe.
I really appreciate your help or a pointing in the right direction.
Kind regards,
Seb
Good Morning,
my apologies, yesterday I did not find this thread here:
In CMD "python" starts Python 3.3, "py" starts Python 2.7, how do I change this?
From now on I will go with "py -X.Y" to start the version of Python I want.
Kind regards,
Seb
I know that there are many posts on how to change your default Python version but none refer to Gurobi recognizing the correct version.
When I open Spyder, Python 3.5 is my default.
How do I get my Gurobi 6.5.2 win64 (which now supports Python 3.5 on Windows64, see link),
to recognize my Python 3.5 as default and not Python 2.7.8?
Judging from this tutorial, you need to point pysetup to the location of your Python installation, i.e., the Python 3.5 folder you want.
I have installed Anaconda on Windows 7 from the full installer and then created an Anaconda Python 3 environment (py3k) using conda. From my reading of the installation instructions at
http://continuum.io/blog/anaconda-python-3
I type activate py3k at the Anaconda command prompt to obtain that environment and in the Command Prompt window it says
[py3k] C:\users.. etc
which would appear to indicate that I am, in fact, in a Python 3.X environment. However, when I type 'Python' at the prompt I get
Python 2.7.5 | Anaconda ... etc
Am I still in a Python 3.X environment or have I omitted to do something installation-wise or otherwise?
have you tried unset PYTHONPATH, and which python?
If you do that after activating py3, you should be able to the python 3 interpreter. If not, what do you get after executing which python?
Where on Earth is the download for numpy for python 3.x? I realize there is already a question like this here, but that was 3 years ago and all the links are outdated or dead. I've found tons of downloads saying they are for python 2.7 like this, but none for python 3. Am I just missing something obvious?
I think you're in the correct place - http://sourceforge.net/projects/numpy/files/NumPy/1.7.2/ - in the same directory is a link to numpy-1.7.2-win32-superpack-python3.3.exe/download
NumPy 1.7.2 Release Notes ************* This is a bugfix only release in the 1.7.x series. It supports Python 2.4 - 2.7 and 3.1 - 3.3 and is the last series that supports Python 2.4 - 2.5.
Or you can get pre-compiled windows binaries here - http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
http://sourceforge.net/projects/numpy/files/ has several Python 3 binaries (for recent versions). So does http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy. Running easy_install numpy or pip install numpy should also work. Downloading the source and running its setup.py with any supported Python version should work as well.