forum.alglib.net
http://forum.alglib.net/

Problems with library in Ipython.
http://forum.alglib.net/viewtopic.php?f=2&t=2285
Page 1 of 1

Author:  hector [ Sat Apr 04, 2015 6:23 pm ]
Post subject:  Problems with library in Ipython.

Hi all,
Most likely is a silly question but I am having problems using xalglib.py
My OS is Linux
I am using Python 2.7
I downloaded the alglib-3.9.0.ipython.gpl file and extracted all the files in a folder. Within the ipython folder I can find the xalglib.py and check.py files.
If I run python check.py I get the following error:
Traceback (most recent call last):
File "check.py", line 1, in <module>
import xalglib
File "/alglib_folder/ipython/xalglib.py", line 25, in <module>
import clr
ImportError: No module named clr
I also think that I will have problems with the next import: "import System"
Those libraries do not seem to be available for Ipython...
What am I doing wrong?
Thanks for your help,
Hector

Author:  Sergey.Bochkanov [ Mon Apr 06, 2015 8:22 am ]
Post subject:  Re: Problems with library in Ipython.

Did you used CPython or IPython?

Author:  Sergey.Bochkanov [ Mon Apr 06, 2015 8:43 am ]
Post subject:  Re: Problems with library in Ipython.

Error messages like yous are typical when IPython program is executed from CPython.

Author:  hector [ Mon Apr 06, 2015 11:16 am ]
Post subject:  Re: Problems with library in Ipython.

Hello,
First of all, thank you very much for your replies.
I do not have installed CPython in my system as far as I know.
If I just run in a terminal window "python check.py" then I assume that I am using the Python from the system, that is Python 2.7.9 and I get the aforementioned error.
If I open an Ipython session and I type "import xalglib.py" and hit "enter" then I get the same error.
I have the same problem if I run both files in an Anaconda environment.
In fact, both "clr" and "System" libraries seem to be available in a .NET environment and not in linux by default.
I would really appreciate if you can help me to solve this problem.
Thanks,

Hector

Author:  hector [ Mon Apr 06, 2015 11:56 am ]
Post subject:  Re: Problems with library in Ipython.

Hi again,
Just in case, I have tried to use the alglib-3.9.0.cpython.gpl file that according to the web page "can be used from Python 2.x and 3.x". Once I have extracted its content in a folder, I can find the following "relevant" files:
core (it's a folder)
xalglib.py
setup.py
If I run "python setup.py" i get the following error: "ALGLIB installer: unable to detect ALGLIB shared library".
It is "reasonable" because when it tries to copy the shared libraries from the core directory it looks for the core/alglib.so file and that file is not there. In the core folder there are only ".dll" libraries for a Windows environment. Should I have that alglib.so file there?
Thanks again,
Hector

Author:  hector [ Thu Apr 09, 2015 9:59 am ]
Post subject:  Re: Problems with library in Ipython.

Hi,
Following step by step the instructions in the cpython manual helped to solve most of the issues.
Now I will start using the RBF subpackage.
Thanks,

Hector

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/