I installed Python-3.1.3 on Ubuntu 12.04 Server Edition following this method. After that, I run a simple program calling to paramiko module. I got several errors related to package imports. The following screenshot shows them:

enter image description here

I ask this question because I am sure I will get similar import packages error with future program.

So as to use Python-3.1.3, inside the script, I put this line #!/usr/bin/python3.1.3

How can I resolve this problem ?

  • it will be a hard task to specify the full path to them all, especially that I will need to search their patch all the times for the future programs – user284234 May 28 '14 at 14:25
  • Can you try running them with python2? – jobin May 28 '14 at 14:26
  • But I need python-3.1.3. Python2.7 does not cause me these troubles, but I must used Python-3.1.3 – user284234 May 28 '14 at 14:26

You were missing one or more development fies during compiling. It probably reported at the end of configuring or make that some modules haven't been build.

Try to install openssl-dev first and then build/install again.

Is there a reason to use the exact 3.1.3 version? The 12.04 repositories contain Python 3.2.

  • I installed openssl before I installed Python3.1.3<br><br>Do you mean I must install openssl-dev before installing Python3.1.3 ? I need this Python version for a particular reason, I can not use an other version for some special tasks. – user284234 May 29 '14 at 13:47
  • @begueradj: Yes, you need the openssl development files and then recompile (important!) and reinstall Python. – Timo May 30 '14 at 12:02
  • how can I recompile ? – user284234 May 30 '14 at 12:07
  • Run the ./configure, make and make install steps again from your posted link. I don't want to be an asshole, but maybe it would be good to read a bit first before starting to mess with custom compiled packages, especially something important like Python. You're following the steps on that website without even knwoing what you're doing, that's not good. – Timo May 31 '14 at 11:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy