Personal tools
You are here: Home Forum Use using scipy or other python modules

using scipy or other python modules

Up to Use
  • using scipy or other python modules

    Posted by alzina at October 05. 2007
    Hi, I installed salome3.2.6 on gutsy gibbon using debian salome package. In salome , i use python 2.3.5 because the install of salome with native python give some errors (omniorb). I would like to use module python as scipy in script salome but it don't find this module, or python 2.5.1 find it. The error is " File /usr/local/salome_3.2.6/KERNEL_3.2.6/lib/python2.3/site-packages/salome/import_hook.py", line 156, in import_hook" . I tried to copy every path from sys.path of python 2.5 to python 2.3.5, without success. could you help me? regards alzina
    • Re: using scipy or other python modules

      Posted by Christophe Bourcier at October 05. 2007
      Hi

      You can try to install the scipy debian sarge package:

      - download the package: http://packages.debian.org/sarge/python2.3-scipy/i386/download

      - extract it in the directory "usr_temp" (you can safely remove this directory later):
      dpkg-deb --vextract python2.3-scipy_0.3.2-6_i386.deb usr_temp

      - move the package files into your python-2.3 directory installed by Salome:
      mv usr_temp/usr/* /Python-2.3

      - test your scipy installation:

      source env_products.sh
      python
      import scipy

      You might need the python2.3-scipy-core package too: http://packages.debian.org/sarge/python2.3-scipy-core/i386/download


      Christophe
    • Re: using scipy or other python modules

      Posted by Vadim SANDLER at October 05. 2007
      Hello,

      Did you tried adding of the /usr/lib/python2.5/site-packages to the end of PYTHONPATH environment?
      For example:
      [bash] source env_products.sh
      [bash] export PYTHONPATH=/usr/lib/python2.5/site-packages:${PYTHONPATH}

      But probably this will not help because of older version of Python used by salome 3.2.6 :(
      In this case the only solution is to download scipy sources and install them to some location (basing on the salome 3.2.6 environment) and then use this scipy instead of the native one.

      Regards,
      Vadim.
      • Re: using scipy or other python modules

        Posted by alzina at October 05. 2007
        thank you for the quick answer.

        answer for christophe Bourcier:
        I don't want to use this method because scipy is just an example, i would like to install more modules as pylab,... which are already in my ubuntu gutsy

        answer for vadim sandler:
        I tried this solution but salome give me errors "ImportError: /usr/lib/python2.5/site-packages/numpy/core/multiarray.so: undefined symbol: PyOS_ascii_strtod". Consequently I think this version of scipy is not compatible with python 2.3.5



        i think, the only solution is to install salome with native python  and  build source of every modules (salome, omniorb,...)
        do you agree with me or do you have another ideas


        thank you very much
        alzina
        • Re: using scipy or other python modules

          Posted by Vadim SANDLER at October 08. 2007
          Hello Alzina,

          Well, in such a case this is the only possible solution :(

          Regards,
          Vadim.
Powered by Ploneboard
Document Actions