-
Notifications
You must be signed in to change notification settings - Fork 5
Error with 'import scilab2py' #12
Comments
I am getting the same error on a Windows 10, Anaconda3 (Python 3.5) installation. Installed with pip command. I have set the Path environment variable to include the Scilab 5.5.2\bin directory... |
Actually I found the solution for this on the oct2py repo. The code is looking for dlls no longer included with numpy. So you have to use a try/except block in the init.py file around line 50 like this : comment out the following lines:
add the following lines:
|
I'm using Anaconda 5.2 (Python 3.6.5). For me the two DLL's can be found under: {anaconda_path}/Library/bin So i changed the following two lines: lib1 = ctypes.CDLL(os.path.join(basepath, 'core', 'libmmd.dll'))
lib2 = ctypes.CDLL(os.path.join(basepath, 'core', 'libifcoremd.dll')) to: lib1 = ctypes.CDLL(os.path.join(os.path.split(sys.executable)[0], 'Library', 'bin', 'libmmd.dll'))
lib2 = ctypes.CDLL(os.path.join(os.path.split(sys.executable)[0], 'Library', 'bin', 'libifcoremd.dll')) The easiest way to fix this would be to combine it with the try/except. For example: try:
lib1 = ctypes.CDLL(os.path.join(basepath, 'core', 'libmmd.dll'))
lib2 = ctypes.CDLL(os.path.join(basepath, 'core', 'libifcoremd.dll'))
. . .
except Exception:
lib1 = ctypes.CDLL(os.path.join(os.path.split(sys.executable)[0], 'Library', 'bin', 'libmmd.dll'))
lib2 = ctypes.CDLL(os.path.join(os.path.split(sys.executable)[0], 'Library', 'bin', 'libifcoremd.dll')) @blink1073 Would you like me to create a pull request, or do you want to fix it yourself? Thanks for the package by the way. I have yet to try it though. |
@seimsel, PRs are always appreciated 😉 |
When I implement these different fixes in windows I end up with another problem where scilab2py cannot find scilab in anyway at all. Scilab runs from cmd line as required by install instructions to test the PATH. The messages are all of the nature "raise Scilab2PyError('Could not find function named |
The issues 13 & 14 you describe above seems that Scilab 6 is working but not communicating correctly with python. I reverted to Scilab 5.5.2 and it now works. |
I am also having this problem OSError Traceback (most recent call last) OSError: [WinError 126] The specified module could not be found but when I follow the fixes above it also gives an error |
Following the Scilab Path Installation using this command setx PATH "%PATH%;<C:\Program Files\scilab-5.5.2\bin>" C:\WINDOWS\system32>setx PATH "%PATH%;<C:\Program Files\scilab-5.5.2\bin>" |
I was able to call Scilex from the CMD |
Scilab not found. Please see documentation at: already run this while setting the cmd to run as administrator and resulted to C:\WINDOWS\system32>setx PATH "%PATH%;<C:\Program Files\scilab-5.5.2\bin>" SUCCESS: Specified value was saved. still it didnt work |
Iam currently using the old scilab version 5.5.2 and unfortunately. I tried
editing the Init file as shown in the fixes in the comment section . I
still failed i'll try reinstalling python
or use some other ways so that i could use scilab in other languages. I'am
doing this for a research study in my degree(ECE) I was planning to use
Scilab as a computational engine that sends the processed data to a python
application
…On Fri, Oct 26, 2018 at 5:48 PM Dave G ***@***.***> wrote:
I looked back at my notes and found that what I am doing only works in
Scilab5 not Scilab6. I was able to get everything to work but had to
rollback Scilab. Using an old Scilab was not a problem for me. In the
end though, I decided to do all the work I was trying to do in the Scilab
environment. For many miscellaneous tasks this bridge would be handy.
On Fri, Oct 26, 2018 at 12:03 AM mentablack ***@***.***>
wrote:
> import scilab2py
>
> Scilab not found. Please see documentation at:
> http://blink1073.github.io/scilab2py/source/installation.html
>
> already run this while setting the cmd to run as administrator and
> resulted to
>
> C:\WINDOWS\system32>setx PATH "%PATH%;<C:\Program
Files\scilab-5.5.2\bin>"
>
> SUCCESS: Specified value was saved.
>
> still it didnt work
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#12 (comment)
>,
> or mute the thread
> <
https://github.com/notifications/unsubscribe-auth/ALXnCopWdfMqCzP8K9OOnQsAxKgzrlPNks5uoomIgaJpZM4S2zXq
>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AqbNddscK-7j1ynIVFccfWnPSi_2tCaGks5uotpsgaJpZM4S2zXq>
.
|
I'm not sure how to work around the change in numpy, so for now I wrapped the whole thing in a |
Still has an error after I installed scilab2py using pip install -U scilab2py
Scilab not found. Please see documentation at: |
Thank you everyone for the help |
Will scilab2py run on a Raspberry Pi ? |
It should, but I've never tried ;). |
@blink1073 I sincerely want to ask a question regarding Scilabmagic Can i extract a variable from scilab and move it to python What Iam trying to do Using a basic XCOS block diagram Is this possible? |
My previous comment stands - using Scilab 5.5. I did not try it with
Xcos, however. Also since my original comments I did a lot of work with
Xcos by itself in Scilab (no Python connection) and discovered Xcos Windows
integration in Scilab 6 does not work very well - all sorts of Java
integration issues. I haven't had any troubles at all with Xcos in
Scilab 5 in Windows. If you're pursuing the Python idea using Xcos in
Windows with Scilab 6 I expect you're having a terrible time because Xcos
in Windows with Scilab 6 does not work well at all.
…On Mon, Dec 31, 2018 at 2:45 AM mentablack ***@***.***> wrote:
@blink1073 <https://github.com/blink1073> I sincerely want to ask a
question regarding Scilabmagic
Can i extract a variable from scilab and move it to python
or vice versa ? I have been reading the scilabmagic.py for examples but i
failed to display or get a variable from scilab.
What Iam trying to do Using a basic XCOS block diagram
simply a step response that is feed to an "To workspace block" and naming
it as a variable " Stepout2Python" Instead of displaying the graph on
Scilab I want to display it in python .
Is this possible?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALXnCptZsknyotZtDCahZ0bMP0bGYL9Xks5u-cCygaJpZM4S2zXq>
.
--
Dave
davegutz@alum.mit.edu
|
I agree. XCos on Windows with Scilab 6.0 is horrible. |
I'am using Scilab 5.5.2 it works perfectly fine like u said and was not successful with Scilab 6 I found this pdf using python and xcos together but im having errors also |
I'm a newbie to Python but have experience in MATLAB/Scilab. I'm creating a mathematical model in Scilab, but the input data is generated from a Python (2.7) code. As a result, I'm trying to make use of the the scilab2py module in order to run Scilab from inside Python to allow the process to be much simpler.
I installed all the required Python modules for scilab2py (i.e. Scipy, Numpy) and have Scilab installed in my PATH (following all the instructions in http://blink1073.github.io/scilab2py/source/installation.html), so I installed scilab2py using
pip install scilab2py
which it says was successful. However, if I enter Python and try
import scilab2py
I am met with the following error:
Does anyone know how to fix this error? Or perhaps know where I am going wrong with implementation?
Thanks in advance.
The text was updated successfully, but these errors were encountered: