Cygwin and path issues

B

Berlin Brown

I am trying to run some basic unit tests, but I can't get the paths
setup in python/cygwin to pick up my modules.

This code works fine in linux and I installed python through cygwin
not as part of the win32 install.


DIR_PATH =
os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
PROJECT_HOME = os.path.join(DIR_PATH, '..', '..', '..')

print("INFO: project_home=%s" % PROJECT_HOME)

EXTRA_PATHS = [
DIR_PATH,
os.path.join(PROJECT_HOME, 'projects', 'ghostnet'),
os.path.join(PROJECT_HOME, 'google_appengine'),
os.path.join(PROJECT_HOME, 'google_appengine', 'lib', 'webob'),
os.path.join(PROJECT_HOME, 'google_appengine', 'lib', 'yaml', 'lib')
]
sys.path = EXTRA_PATHS + sys.path

print sys.path

---------------

in my ~/.bash_profile

I also included the following.

export PYTHONPATH=/cygdrive/c/projects/projects_ecl/botlist:/cygdrive/
c/projects


Basically, I tried to add the module directory locations in my code;
also I tried to add the absolute path to my PYTHONPATH.

None of these approaches work. I get the following error, which I
dont get on the linux side:

Traceback (most recent call last):
File "run_all_tests.py", line 108, in <module>
from django.conf import settings
ImportError: No module named django.conf
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,737
Latest member
Georgeengab

Latest Threads

Top