Reputation: 3725
Am working arround zc.buildout. I deployed my project in my local apache server.
My issue is when I run it, I got an import error 'No module named raven.conf' But there is all the packages I specified in egg directory.
That is django trying to load packages from system's python package, not from the isolated buildout folder. How can I solve it,
Myproject
bootstrap.py
setup.py
bin/
buildout
django
django.wsgi
.....
eggs/
raven-3.1.13-py2.7.egg
..........
parts
project
develop-eggs
src/
some files
django.wsgi
myapp/
files
settings.py
buildout.cfg
[buildout]
parts = python
django
develop = .
eggs = beautifulsoup
MySQL_python
pymongo
requests
.......
.......
raven
sqlalchemy
[python]
recipe = zc.recipe.egg
interpreter = python
eggs = ${buildout:eggs}
[django]
recipe = djangorecipe
wsgi = true
settings = settings
eggs = ${buildout:eggs}
Thanks in advance.
Upvotes: 0
Views: 423
Reputation: 3809
Did you checked that your Django project directories have the proper __init__.py
files? This error often is due to that.
In your src/myapp
directory, you should have a __init__.py
file, so Python will get it as a module and can import it. The same for all you other directories inside myapp/
containing Python code. If you have an ImportError
in your raven.conf
directory, probably is because you don't have any __init__.py
file in your conf/
dir.
Upvotes: 1