forum.alglib.net

ALGLIB forum
It is currently Sun Dec 22, 2024 6:26 pm

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Problems with library in Ipython.
PostPosted: Sat Apr 04, 2015 6:23 pm 
Offline

Joined: Sat Apr 04, 2015 6:05 pm
Posts: 7
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


Top
 Profile  
 
 Post subject: Re: Problems with library in Ipython.
PostPosted: Mon Apr 06, 2015 8:22 am 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
Did you used CPython or IPython?


Top
 Profile  
 
 Post subject: Re: Problems with library in Ipython.
PostPosted: Mon Apr 06, 2015 8:43 am 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
Error messages like yous are typical when IPython program is executed from CPython.


Top
 Profile  
 
 Post subject: Re: Problems with library in Ipython.
PostPosted: Mon Apr 06, 2015 11:16 am 
Offline

Joined: Sat Apr 04, 2015 6:05 pm
Posts: 7
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


Top
 Profile  
 
 Post subject: Re: Problems with library in Ipython.
PostPosted: Mon Apr 06, 2015 11:56 am 
Offline

Joined: Sat Apr 04, 2015 6:05 pm
Posts: 7
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


Top
 Profile  
 
 Post subject: Re: Problems with library in Ipython.
PostPosted: Thu Apr 09, 2015 9:59 am 
Offline

Joined: Sat Apr 04, 2015 6:05 pm
Posts: 7
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 35 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group