Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I need to install mysql.connector to python3 but as python 2.7 is the default, it'll go there. How can I specify what python I want the module to be installed into? (I'm using mysql.connector.deb package)

share|improve this question
    
I just done it downloading the source code and installing it according to mysql instructions using sudo python3 setup install –  user185566 Aug 31 '13 at 5:26

1 Answer 1

while loading the module if you give python it will give you python 2.7. If you'd like to access python3 then simply type as python3 in your terminal.

frank@FRANK-NATHE:~$ python
Python 2.7.3 (default, Sep 26 2012, 21:53:58) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

[1]+  Stopped                 python
frank@FRANK-NATHE:~$ python3
Python 3.2.3 (default, Oct 19 2012, 19:53:57) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 

What I am trying to say is , use python3 while installing the module. then it will go for python3.

To install the module for python 3 , do as

python3 setup.py install

Hope that helps.

share|improve this answer
    
Thanks man. Yes, I downloaded the source and installed with python setup.py install, as the .deb package won't allow me to select the python version. –  user185566 Aug 31 '13 at 5:27
    
No what I am saying is , do as python3 setup.py install –  Raja Aug 31 '13 at 5:28
    
Yes, that's what I've done. Thanks. –  user185566 Aug 31 '13 at 5:29
    
please accept the answer, if its helped you. Thank you –  Raja Aug 31 '13 at 5:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.