Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 927
  • Last Modified:

Python modules for Python 3 on Linux (Ubuntu)

How can I install modules like CherryPy or SQLAlchemy on Linux so that they will be available in Python3 and not in the default Python2.7?

I have installed CherryPy successfully but I can import it only in 2.7 (launched with $python) while in 3.4 (launched with $python3) says "No module named cherrypy". I found on the net a command:

sudo apt-get install subversion python-mako python-simplejson python-cherrypy3 graphviz

but it didn't solved the problem.
0
Zberteoc
Asked:
Zberteoc
  • 3
  • 2
1 Solution
 
Swadhin RaySenior Technical Engineer Commented:
Can you try installing under python3:

sudo apt-get install subversion python-cherrypy3

Open in new window


Then try to import and check if you are able to do it.
0
 
Swadhin RaySenior Technical Engineer Commented:
You can also find some installation under the below link:

http://docs.cherrypy.org/en/latest/install.html
0
 
gheistCommented:
Python3 modules start with python3-
So yours is python3-cherrypy3
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
ZberteocAuthor Commented:
@gheist:  That did it. Thanks!

Do you know how can I install "routes" for Cherrypy for Python3?
0
 
gheistCommented:
apt-cache search python3- | grep routes
0
 
gheistCommented:
Alternative is to use easy_install or build package (again take care it picks up correct python)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now