I'm trying to run a scrapy project on a ubuntu server. For which I need to add the project path to python path.
I created a .bash_profile
file in the /home
directory with the following contents:
PYTHONPATH=$PYTHONPATH:/home/john/Desktop/myscraper/
EXPORT $PYTHONPATH
But I'm getting error running my python file stating it didn't find the module.
ImportError: No module named myscraper.items
I tried using the following paths, but nothing works.
/home/john/Desktop/myscraper/
/home/john/Desktop/myscraper
home/john/Desktop/myscraper/
home/john/Desktop/myscraper
/home
directory - or in your$HOME
directory? Did you really writeEXPORT
- orexport
? – steeldriver Feb 1 '18 at 23:42EXPORT
all in caps, and created the file in the/home
directory. I don't know what you mean by the$HOME
directory. – Raven Feb 1 '18 at 23:46