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. Advertisements

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. Olaf Petzold

    cygwin vcom path problems

    Olaf Petzold, Oct 1, 2005, in forum: VHDL
    Replies:
    2
    Views:
    5,159
    Andy Moreton
    Oct 3, 2005
  2. Replies:
    0
    Views:
    736
  3. Replies:
    0
    Views:
    630
  4. WELCOME to

    , Sep 3, 2003, in forum: Python
    Replies:
    1
    Views:
    711
    Robin Becker
    Sep 5, 2003
  5. Replies:
    0
    Views:
    565
  6. Replies:
    6
    Views:
    1,351
  7. G. Randall

    Cygwin and path question

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

    Known issues with Perl under Cygwin?

    weston, Aug 27, 2005, in forum: Perl Misc
    Replies:
    3
    Views:
    238
    Dave Weaver
    Sep 5, 2005
Loading...