python and python2.7 runs different python instances
NickName:brsbilgic Ask DateTime:2012-10-04T16:27:00

python and python2.7 runs different python instances

This is the output when I write whereis python2.7

python2.7: /usr/local/bin/python2.7 /usr/local/lib/python2.7 /opt/python2.7.1/bin/python2.7

Version of python under /usr/local/ is python2.7.2 and version of python under /opt/python/2.7.1 is python2.7.1 as you see.

When I write python it runs python2.7.1 because I changed the bash_profile. But When I write python2.7 it runs python2.7.2.

I would like totally remove the python2.7.2 which is under the /usr/local/ and use the binary under /opt/python2.7.1.

How can I solve this problem?

Note: It is a CentOS5 server and python2.4 is already installed as you consider.

Copyright Notice:Content Author:「brsbilgic」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/12723234/python-and-python2-7-runs-different-python-instances

Answers
aayoubi 2012-10-04T08:31:19

your PATH is mixed up, do the following:\n\nexport PATH=/opt/python2.7.1/bin:$PATH\nexport LD_LIBRARY_PATH=/opt/python2.7.1/lib:$LD_LIBRARY_PATH\n",


More about “python and python2.7 runs different python instances” related questions

python and python2.7 runs different python instances

This is the output when I write whereis python2.7 python2.7: /usr/local/bin/python2.7 /usr/local/lib/python2.7 /opt/python2.7.1/bin/python2.7 Version of python under /usr/local/ is python2.7.2 and

Show Detail

Django hosting with mod_wsgi / apache with Python2.7 and Python3 concurrently

I have a Django website hosted with apache/mod_wsgi. The site has originally been written in Python2.7, but I am now in the process of changing over to Python3. I have a QA version of site availab...

Show Detail

Start two instances of spyder with python2.7 and python3.4 in ubuntu

I would like to install two spyder: one is with python2.7 and the other is with python3.4 And I run the commands to install both: pip install spyder pip3 install spyder But how to start it diffe...

Show Detail

trying to reinstall python2.7 mac

So I created some issues in my python when trying to install more versions of python (2.6, 3.3) to try and get PyDev for eclipse to work. This caused issues with my (then) working version of pytho...

Show Detail

repo python error on python2.7

I create another folder trying to download android source code and get the following error, but for my first Android source code directory, there's no such error. ~/AndroidFramework2/bin/

Show Detail

Upgrading python pacakge in python2.7

I am new to python. I need to run a python script(riboplot) in python2.7 which requires the package "pysam_0.8.4" to run. In my python2.7, when I checked the version import pysam pysam.__version_...

Show Detail

Centos Python2.7 YUM Dependency Resolution with Python2.7

I am trying to use a Centos box for a Vagrant VM (because I think it’s the closest thing to an AWS Amazon Linux machine). The Problem Amazon Linux has python2.6 as the system python but there’s a...

Show Detail

Different PYTHONPATHs for Python2.7 and Python3.4

I've got both Python2.7 and Python3.4 installed on my computer. I've installed Numpy for both 2.7 and 3.4, but can't figure out how to specify the PYTHONPATH variable so that 2.7 uses Numpy2.7 and...

Show Detail

Use python2.7 in venv where python3 is default python

I have python2.7, python3.7, python3.6 on my machine. I am still not sure how manage and see location of all three python version. Currently I just type python with version name to open that term...

Show Detail

Python code runs from IDE, but not from terminal

My imports don't work when I try to run the code from Linux terminal. Specifically, imports from other packages in the same project. I know this is a PYTHONPATH issue, but I don't know how to diagn...

Show Detail