Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why am I getting an ImportError when I try to run Pyramid?

I'm trying to go through the "Single File Tasks" tutorial from the Pyramid documentation, but I'm running into a problem with actually running the single-file project.

I am running Python 2.7 on Ubuntu 11.10. I've installed setuptools, installed virtualenv, and created a virtualenv in my home directory with the following command:

virtualenv --no-site-packages env

I then installed Pyramid from within the env directory created above using the following command:

bin/easy_install pyramid

Continuing to follow the Single File Tasks tutorial's directions, I created a Pyramid project inside my env directory.

The problem starts at this point: when I run python tasks.py, it responds with the following error:

Traceback (most recent call last):
  File "tasks.py", line 4, in <module>
    from pyramid.config import Configurator
ImportError: No module named pyramid.config

I am really interested in using Pyramid but I don't know where to go from here.

like image 534
Eric Avatar asked Jan 14 '12 16:01

Eric


1 Answers

run the app from your python env,

../bin/python tasks.py

assuming your in env/tasks

like image 149
Blaise Laflamme Avatar answered Oct 13 '22 01:10

Blaise Laflamme