This forum has been archived. Please start a new discussion on GitHub.

pb with python example


I would like to run Minimal python example.

I have installes python2.4, IcePython, ... My os is windows xp, VC6

When I want to run, I have this message :
Traceback (most recent call last):
File "", line 1, in ?
import sys, traceback, Ice
File "C:\cygwin\Ice-3.0.1\python\", line 15, in ?
import IcePy
ImportError: No module named IcePy

I check my path, python. I included the dlls, lib, ... I include also the path where is.

I don't know what to do !
I think it a path problem, but I can't solve it.

I thank you very much


  • matthew
    matthew NL, Canada
    What python are you using? The cygwin python? The plug-in hasn't been tested with cygwin python as far as I know. Please use the python as described in the README file --

    If you are already using this then you must have setup the environment incorrectly. If you follow the directions in the README file it will definitely work. For more assistance you need to provide lots more information, such as your environment settings, the installation directories, etc.
  • I dowloaded python 2.4 ( for windows.
    I installed it in : C:\Python24

    I dowloaded Ice for Python. I installed in C:\IcePy-3.0.1

    I compile Ice for Python with visual c++ 6. No problems, the compilation is ok.

    After that, I set my variable environment.

    variable : ICEPY_HOME value : C:\IcePy-3.0.1
    variable : PYTHONPATH value : %ICEPY_HOME%\python

    I tried to follow the description in the install file.

    After that, I try to launch in the minimal example. I got the following error :
    Traceback (most recent call last):
    File "", line 11, in ?
    import sys, traceback, Ice
    File "..\..\..\python\", line 15, in ?
    import IcePy
    ImportError: No module named IcePy

    I don't know what to do.

    Thank you for your help
  • matthew
    matthew NL, Canada
    What Ice for python distribution did you download? There is no binary distribution for Python that we provide that will work with a VC6 built Ice runtime. You should either download the source distribution and compile the python plugin yourself with VC6 or upgrade to VS2005 and use the distribution which contains the Python extension DLL.
  • I dowloaded the source distribution for Python :

    Is that wrong ?
  • matthew
    matthew NL, Canada
    Did you compile it? If not, then do that (read the INSTALL file). If you did then the Python extension DLL cannot be in your PATH.
  • yes, I compiled it ! There were no errors. All was ok !
  • this is my path :


    Is it correct ?
  • matthew
    matthew NL, Canada
    What shell are you using? bash? If so, the environment variable syntax you are using is incorrect. I just tried with the IcePy source distribution under Bash with Python 2.4 on my XP box.

    matthew@october /c/src/IcePy-3.0.1/demo/Ice/hello
    $ export ICEPY_HOME=C:/src/IcePy-3.0.1

    matthew@october /c/src/IcePy-3.0.1/demo/Ice/hello
    $ export PYTHONPATH=$ICEPY_HOME/python

    matthew@october /c/src/IcePy-3.0.1/demo/Ice/hello
    $ python

    t: send greeting as twoway
    o: send greeting as oneway
    O: send greeting as batch oneway
    d: send greeting as datagram
    D: send greeting as batch datagram
    f: flush all batch requests
    T: set a timeout
    S: switch secure mode on/off
    s: shutdown server
    x: exit
    ?: help

  • I am using a dos window. I configure my path in the control panel...
  • matthew
    matthew NL, Canada
    Run a DOS window. Do:

    echo %PYTHONPATH%
    echo %PATH%

    And tell me the results.

    Check that IcePy.dll is in the IcePy-3.0.1\python directory, and that this directory is in the PYTHONPATH.
  • pythonpath :


    path :

    I don't have IcePy.dll but IcePy_d.dll in the IcePy-3.0.1\python directory.

    Maybe I have to compile Ice for python without debuging mode...
  • I solved the problem

    I compiled in release mode. I got IcePy.dll.

    I tried and it works perfectly.

    I thank you very very much for your help !!!

    You are a very nice guy !!!

    Thanks a lot !
  • matthew
    matthew NL, Canada
    Ah, glad you found the solution!