Ask Your Question

ImportError: No module named ...

asked 2017-02-04 04:28:01 -0500

Bosco's avatar

updated 2017-02-11 09:18:27 -0500

Evgeny's avatar

For example, when I run "python collectstatic" command for my Django project, the error is raised.

Import Error: No module named askbot
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-02-11 09:24:50 -0500

Evgeny's avatar

updated 2017-02-11 09:26:07 -0500

This means that askbot as well as probably other modules are not on Python path. If you are using virtualenv - virtual environment, then you must activate it first:

source /path/to/env/bin/activate

In the case above the /path/to/ is the directory where the virtual environment was built, by command:

cd /path/to
virtualenv env --no-site-packages

Then, it is assumed that you've installed your modules into that environment. For example installed askbot there:

cd /path/to
source env/bin/activate
pip install askbot #as an example here used basic pip install method

If you've followed the above through with the deployment of the Django project (it is described in the documentation), python collectstatic would work without errors.

edit flag offensive delete link more



Bosco's avatar Bosco  ( 2017-02-11 21:14:36 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-02-04 04:28:01 -0500

Seen: 1,941 times

Last updated: Feb 11 '17