473,698 Members | 2,451 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cygwin and path issues

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.dirnam e(os.path.realp ath(__file__)))
PROJECT_HOME = os.path.join(DI R_PATH, '..', '..', '..')

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

EXTRA_PATHS = [
DIR_PATH,
os.path.join(PR OJECT_HOME, 'projects', 'ghostnet'),
os.path.join(PR OJECT_HOME, 'google_appengi ne'),
os.path.join(PR OJECT_HOME, 'google_appengi ne', 'lib', 'webob'),
os.path.join(PR OJECT_HOME, 'google_appengi ne', '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
Jun 27 '08 #1
0 1135

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2332
by: dw | last post by:
Pehaba, does anyone knows how to install MySQLdb on cygwin? - test device: MySQLdb 0.9.2.0 targz + cygwin 1.5.7-cr-0x9e + python 2.3.3 on cygwin + mysql 4.0.17 win32 - modified setup.py's using thread library.. NO, library + include
3
7364
by: RMJ | last post by:
After installing Enthought's python and typing 'python' from within cygwin the program hangs with no output. I do not remember this being the case with earlier versions of Enthought python. Is this version not compatible with cygwin? Or, is there some configuration file that needs changing? It does run successfully with 'python somecode.py' -but without printing out intermediate results. Thanks! -Roger Jones
0
2700
by: Norm Wong | last post by:
If anyone is interested in using db2uext2 with Cygwin gcc compiler on Windows, I've modified the IBM provided sample with the attached file. There are two main modifications. The mkdir command is the POSIX compliant version as opposed to the MicroSoft C compiler. The second parameter to mkdir is the file mode. In this case, I've made the directories created to be read/write/execute(list) for all users.
3
16743
by: Abby | last post by:
I'm now using Cygwin as my compiler for C code. I use Dev-c++ as my editor. The reason why I chose Cygwin compiler instead of the compiler that came with Dev-C++ is that I believe it uses the same environment as in Linux, so that I don't have to write different sourcecode for both OS. Eventhough, I don't understand about Linux much, and I'm still a beginner in programming, I still have to make my program compatible with both OS (Windows...
2
3233
by: 63q2o4i02 | last post by:
Hi, I'm using python 2.4 and windows XP. I have two packages in the windows version of python in site-packages. They are PyVisa and ctypes, and both live in c:\python24\lib\site-packages I'd like to move these to the cygwin version of python on the same system. I tried copying the PyVisa and ctypes directorices (including
6
8901
by: johnmmcparland | last post by:
Hi all, I am doing some C / C++ programming in cygwin and I notice when I add something to my path then try to compile, the gcc / g++ compiler cannot find some files, even though they are in the directory I may have just added to my path. For example I have copied the example program from http://www.gtk.org/tutorial/c39.html and when I compiled it, the compiler couldn't find gtk/gtk.h.
0
3297
by: dot | last post by:
I spent a few headache filled days trying to use GMP on windows (XP pro) I finally got it to work and since I found little help on the Web I thought someone might find what i did useful. Creating an environment suitable for GMP programming. 1) Create 'cygwin' environment (see below) 2)add GMP to the cygwin directory (see below)
8
2724
by: Ale | last post by:
Hi! I need to compile with "Make" a source written for linux that I need to execute under a Win32 system. I tried to launch Make under cygwin, and it works fine, but it doesn't run under Win32 without CygWin (cygwin1.dll is required, and even if I put this file in the application PATH and in windows/system32 path, the executable doesn't work!) I read that I need to compile sources using MinGW g++ version, but
10
8532
by: Gotch | last post by:
Hi all, I've installed the CDT plugin for Eclipse and I want to use it to work on C/C++ projects under Cygwin. It works, in fact it compiles and runs the usual helloworld c++ program. Now it comes difficult when I try to add external libs. Such as... GTK. Let's explain what I tried. (oh well, I'm using Eclipse Europa 3.3.1 and CDT 4.0.1). First I just added the path of the cygwin includes throug the project->properties- GNU C the path to...
0
8608
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9161
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9029
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8867
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2332
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2006
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.