How to import a module with a dotted path?
Question: I want to import the **paramiko** module located in
**/usr/local/lib/python2.7/dist-packages**. So, I imported it this way:  

    
    
    from usr.local.lib.python2.7.dist-packages import paramiko
    

I have an error syntax related to python2.7 (It considers 7 as a package
located in python2 package)  
  
I have both Python3.1.3 and Python2.7 installed. I program with Python3.1.3
only, however. How can I resolve this problem ?


Answer: How about ?

    
    
    import sys
    sys.path.append('/usr/local/lib/python2.7/dist-packages')
    import paramiko
    

**UPDATED**

The best solution is installing `paramiko` on Python3 env. Take a look at
@DanielRoseman's answer. Or `virtualenv` is worth consideration. Here is a
good tutorial. <http://simononsoftware.com/virtualenv-tutorial/>

