import an external library
Hi all,
I am trying to import an external library nsmp1d_yade.so in my script (see below) and I don't succeed to do it.
When I am using my script with python, doing :
python Simple.py
everything is working and the script is using the content of the library.
However, when I am running the same script with yade :
yade-daily Simple.py
I get an error :
Welcome to Yade 3+3698+47~precise1
TCP python prompt on localhost:9000, auth cookie `ucdsea'
XMLRPC info provider on http://
Running script Simple.py
Traceback (most recent call last):
File "/usr/bin/
execfile(
File "Simple.py", line 2, in <module>
from nsmp1d_yade import *
ImportError: No module named nsmp1d_yade
I don't understand why it is working with python and not with Yade.
Do you have any idea of how I can solve this problem?
Thank you
Raphael
Here is my script Simple.py :
from nsmp1d_yade import *
from pylab import *
from matplotlib import pyplot
import matplotlib.gridspec as gridspec
import numpy as np
## Define the situation
rho_f = 1000
rho_s = 2500
slope = 1e-4
visco_f = 1e-3
dp=6e-3
ndimz=301
h=1.
dsig=np.
dsig[0:
sig=linspace(
ufnp = np.zeros(ndimz)
ufn = np.zeros(ndimz)
alphaf = np.zeros(ndimz)
us = np.zeros(ndimz)
alphas = np.zeros(ndimz)
alphaf=1e0-alphas
tfin=2000.
dt=1e-1
ufnp=nsmp1d_
##
## plots
##
zmin=0
zmax=h
umin=min(ufnp)
umax=max(ufnp)
figure(1)
plot(ufnp,
title('U_f')
#axis([1200, 1900, zmin, zmax])
xlabel('U_f (m/s)')
ylabel('z (m)')
axis([umin, umax, zmin, zmax])
show()
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Raphaël Maurin for more information if necessary.