Reputation: 2236
Simple question as that, but I can't find the answer.
I have a python script located into one of my Django apps - in my django Project.
I'm using PyCharm IDE and local development works fine, I run scripts using CTRL + ALT + R, as below:
from location.crawlers.crawler_cities import *
The problem is, when I have to do it in my Live Server, I have no clue how to import it, I'm doing this:
I then, finally I get this error
ImportError: No module named location.crawlers.crawler_cities
Any ideas how can I run this in Live Server?
Upvotes: 0
Views: 189
Reputation: 1025
Try to append the route of your django project to your PYTHONPATH, before you call the import.
import sys
sys.path.insert(0, '/path/to/project')
Upvotes: 1