The system (RHEL 6.5) already have python installed in /usr/bin/python I installed another version(3.3) in another directory /data/tools/python3, as I do not have root permission.

Now, I have 2 problem.

  1. How can I call python 3.3 seperately ?
  2. How to add module (pypyodbc) to python3.3 ? I intent to use she-bang for calling scripts in 3.3
  • When you say /data/tools/python3, do you mean the python3 binary or the base directory i.e. do you have something like /data/tools/python3/bin/python3, /data/tools/python3/lib/..., etc.?
    – Munir
    Nov 2, 2016 at 19:05
  • Yes. I do have bin,lib directories in /data/tools/python3 Nov 3, 2016 at 15:59

2 Answers 2

  1. You can call python 3 using /data/tools/python3 instead of python.

  2. You will probably need to install it to a separate directory and then import the module from that path.


Add the following lines at the end of your ~/.bash_profile file:

export PATH

Then logout and login again for the new variables to be loaded correctly.

After that, you can run Python3 with python3 command.

To install pypyodbc, you can run pip3 install pypyodbc if you have installed pip on Python3. Otherwise, you can download the source for pypyodbc and run python3 setup.py install

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .