Cygwin and path issues

Discussion in 'Python' started by Berlin Brown, May 6, 2008.

  1. Berlin Brown

    Berlin Brown Guest

    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
    Berlin Brown, May 6, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    421
  2. Replies:
    0
    Views:
    420
  3. WELCOME to

    , Sep 3, 2003, in forum: Python
    Replies:
    1
    Views:
    504
    Robin Becker
    Sep 5, 2003
  4. Replies:
    0
    Views:
    404
  5. G. Randall

    Cygwin and path question

    G. Randall, Apr 8, 2004, in forum: Perl Misc
    Replies:
    5
    Views:
    137
    Darren Dunham
    Apr 9, 2004
Loading...

Share This Page