Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'birmingham': 0.04; 'importerror:': 0.05; 'none,': 0.05; 'scipy': 0.05; 'skip:" 60': 0.05; '40,': 0.09; 'failed:': 0.09; 'i\xe2\x80\x99ve': 0.09; 'path,': 0.09; 'skip:" 80': 0.09; 'subject:module': 0.09; 'cc:addr :python-list': 0.10; 'def': 0.10; 'subject:error': 0.11; 'subject:not': 0.11; '2.7': 0.13; 'file,': 0.15; 'i\xe2\x80\x99m': 0.16; 'kings': 0.16; 'numpy': 0.16; 'scientist': 0.16; 'skip:" 70': 0.16; 'trainee': 0.16; 'wrote:': 0.17; '8bit%:3': 0.17; 'load': 0.19; 'module': 0.19; 'skip:" 30': 0.20; 'foundation': 0.20; 'trying': 0.21; 'import': 0.21; "world's": 0.22; 'skip:_ 20': 0.22; 'cc:2**0': 0.23; 'image-size:2**11': 0.23; 'proprietary': 0.23; 'specified': 0.23; 'script': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'looks': 0.26; '(most': 0.27; 'am,': 0.27; 'donate': 0.27; '(as': 0.27; 'dll': 0.27; 'found.': 0.27; 'skip:" 50': 0.27; 'skip:& 60': 0.27; 'skip:e 30': 0.27; 'message-id:@mail.gmail.com': 0.27; 'run': 0.28; 'skip:& 70': 0.29; 'url:mailman': 0.29; 'array': 0.29; 'skip:_ 10': 0.29; 'skip:& 10': 0.29; 'error': 0.30; '+44': 0.30; 'checked': 0.30; 'point': 0.31; 'url:python': 0.32; 'file': 0.32; 'could': 0.32; 'url:listinfo': 0.32; 'getting': 0.33; 'traceback': 0.33; 'anyone': 0.33; 'hi,': 0.33; 'skip:d 20': 0.34; 'received:google.com': 0.34; 'text': 0.34; 'robert': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'url:org': 0.36; 'subject:" ': 0.36; 'skip:p 20': 0.36; 'author': 0.37; 'best,': 0.37; 'does': 0.37; 'why': 0.37; 'received:209': 0.37; 'university': 0.38; 'skip:o 20': 0.38; 'some': 0.38; 'recipient': 0.39; 'url:mail': 0.40; 'most': 0.61; 'email:': 0.62; 'skip:n 10': 0.63; 'information,': 0.63; 'more': 0.63; 'replying': 0.64; 'virus:src="cid:': 0.64; 'our': 0.65; 'content- type:multipart/related': 0.65; 'tel:': 0.65; '****': 0.65; 'medical': 0.66; 'e-mail.': 0.71; 'privileged.': 0.72; 'exclusive': 0.81; '*****': 0.84; '2013': 0.84; '7000': 0.84; 'cancer': 0.84; 'clinical': 0.84; 'we\xe2\x80\x99re': 0.84; 'hospitals': 0.91; 'joel': 0.91; 'numbers:': 0.91; 'skip:& 80': 0.91; 'subject:found': 0.91; 'treatments': 0.91; '***': 0.93; 'recipient(s)': 0.96 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=FJdDLfUvTZ/QTXH20eaCOUDNkMCFz+uZAhpVqxEJskI=; b=lq63zRbYb2IpV36kCOkiYSslmjwlQzmKyynosdT//j4OmHxAtvurz2/nIXldGLW10Z QhhLMQo8OZ5vPTT1o0cWYmLR848OzjANBugHPiFTmzKJc035Ltkd9fxIDxBgGNkd465k KV/qiso7EAzAfGwNOeGT9qMzSMmTiT4TE51VHObhYmdFRmnlFht6R6OeGM03/dKQfb2t Wm52nh9kTktduQz/G9U6XuVBaC5HzM0S9RXmH+AvKtCK2bT3Ffuwj/28HqLQAhBt2/oN aa4xtDgCtTTqjXHqyc17VjYs03qFsqbkxjwQ6QdQumDyAXuUFrLSuWsB3KSwgXDnSdz3 txNQ== MIME-Version: 1.0 X-Received: by 10.220.153.143 with SMTP id k15mr3097848vcw.33.1363706762676; Tue, 19 Mar 2013 08:26:02 -0700 (PDT) In-Reply-To: <20130319151020.0606144837F@nhs-pd1e-esg103.ad1.nhs.net> References: <20130319151020.0606144837F@nhs-pd1e-esg103.ad1.nhs.net> Date: Tue, 19 Mar 2013 11:26:02 -0400 Subject: Re: "module could not be found" error From: Joel Goldstick To: Robert Flintham Content-Type: multipart/related; boundary=f46d043d67712b06f404d848b96c Cc: "python-list@python.org" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 443 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1363706771 news.xs4all.nl 6866 [2001:888:2000:d::a6]:55645 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:41522 --f46d043d67712b06f404d848b96c Content-Type: multipart/alternative; boundary=f46d043d67712b06f204d848b96b --f46d043d67712b06f204d848b96b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, Mar 19, 2013 at 11:10 AM, Robert Flintham < Robert.Flintham@uhb.nhs.uk> wrote: > Hi,**** > > ** ** > > I=E2=80=99m trying to run the following, with representing an = array of > floating point numbers:**** > > ** ** > > ------------------------------------------------------------**** > > import numpy as np**** > > import scipy as sp**** > > from scipy import optimize**** > > ** ** > > xdata=3D**** > > ydata=3D**** > > ** ** > > def t2fit(x,T2,A):**** > > return A * np.exp(-x/T2)**** > > ** ** > > popt, pcov =3D optimize.curve_fit(t2fit, xdata, ydata, p0=3DNone, sigma= =3DNone)* > *** > > ------------------------------------------------------------**** > > ** ** > > But I=E2=80=99m getting an ImportError:**** > > ** ** > > Traceback (most recent call last):**** > > File > "K:\eclipse\plugins\org.python.pydev_2.7.1.2012100913\pysrc\pydevd.py", > line 1397, in **** > > debugger.run(setup['file'], None, None)**** > > File > "K:\eclipse\plugins\org.python.pydev_2.7.1.2012100913\pysrc\pydevd.py", > line 1090, in run**** > > pydev_imports.execfile(file, globals, locals) #execute the script**** > > File > "K:\eclipse\plugins\org.python.pydev_2.7.1.2012100913\pysrc\_pydev_execfi= le.py", > line 38, in execfile**** > > exec(compile(contents+"\n", file, 'exec'), glob, loc) #execute the > script**** > > File "K:\PROGRAMMING\MRI_Python\fatfrac.py", line 7, in **** > > from scipy import optimize**** > > File "K:\Python33\lib\site-packages\scipy\optimize\__init__.py", line > 147, in **** > > from ._minimize import ***** > > File "K:\Python33\lib\site-packages\scipy\optimize\_minimize.py", line > 29, in **** > > from .lbfgsb import _minimize_lbfgsb**** > > File "K:\Python33\lib\site-packages\scipy\optimize\lbfgsb.py", line 40, > in **** > > from . import _lbfgsb**** > > ImportError: DLL load failed: The specified module could not be found.***= * > > ** > Looking at the paths, it looks like some packages are for p 2.7 and some for p 3.3 > ** > > ** ** > > I=E2=80=99ve checked the path, and the file lbfgsb.py is definitely at th= at > location (as are optimize.py and _minimize.py). Does anyone know why I= =E2=80=99m > getting the error?**** > > ** ** > > All the best,**** > > Rob**** > > ** ** > > ** ** > > ** ** > > *Robert Flintham > Trainee Clinical Scientist - MRI***** > > Tel:**** > > +44 (0)121 371 7000**** > > Email:**** > > Robert.Flintham@uhb.nhs.uk**** > > Web:**** > > http://www.uhb.nhs.uk**** > > > *We=E2=80=99re bringing the world's most advanced cancer treatments to Bi= rmingham. > Find out more at www.qecancerappeal.org or text **QEHB01 =C2=A35** to **7= 0070**to donate =C2=A35 to our appeal. > ** > ** > RRPPS > Medical Physics - University Hospitals Birmingham NHS Foundation Trust > 63 Melchett Road, Kings Norton, > Birmingham, B30 3HP > ** > ******* > > > > DISCLAIMER: > > This email and any attachments hereto contains proprietary information, s= ome or all of which may be confidential or legally privileged. It is for th= e exclusive use of the intended recipient(s) only. If an addressing or tran= smission error has misdirected this e-mail and you are not the intended rec= ipient(s), please notify the author by replying to this e-mail. If you are = not the intended recipient you must not use, disclose, distribute, copy, pr= int, or rely on this e-mail or any attachments, as this may be unlawful. > > -- > http://mail.python.org/mailman/listinfo/python-list > > --=20 Joel Goldstick http://joelgoldstick.com --f46d043d67712b06f204d848b96b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable



On Tue, Mar 19, 2013 at 11:10 AM, Robert Flintham <Robert= .Flintham@uhb.nhs.uk> wrote:

Hi,

=C2=A0

I=E2=80=99m trying to run the following, with <= ;an array> representing an array of floating point numbers:

=C2=A0

-------------------------------------------------= -----------

import numpy as np

import scipy as sp=

from scipy import optimize<= /span>

=C2=A0

xdata=3D<an array>

ydata=3D<an array>

=C2=A0

def t2fit(x,T2,A):

=C2=A0=C2=A0=C2=A0 return A * np.exp(-x/T= 2)

=C2=A0<= u>

popt, pcov =3D optimize.curve_fit(t2fit, = xdata, ydata, p0=3DNone, sigma=3DNone)

------------------------------------------------------------<= /u>

=C2=A0=

But I=E2=80=99m getting an ImportError:

=C2=A0

Traceback (most recent call last):=

=C2=A0 File "K:\ec= lipse\plugins\org.python.pydev_2.7.1.2012100913\pysrc\pydevd.py", line= 1397, in <module>

=C2=A0=C2=A0=C2=A0 debugger.run(setup[= 9;file'], None, None)

=C2=A0 File "K:\eclipse\plugins\org.python.pydev_2.7.1.201210= 0913\pysrc\pydevd.py", line 1090, in run

=C2=A0=C2=A0=C2=A0 pydev_imports.execfile= (file, globals, locals) #execute the script

=C2=A0File "K:\eclipse\plugins\org.python.= pydev_2.7.1.2012100913\pysrc\_pydev_execfile.py", line 38, in execfile=

=C2=A0=C2=A0=C2=A0 exec(compile(contents+= "\n", file, 'exec'), glob, loc) #execute the script

=C2=A0 File "K:\PROGRAMMING\MRI_Pyth= on\fatfrac.py", line 7, in <module>

=C2=A0=C2=A0 =C2=A0from scipy import optimize

=C2=A0 File "K:\Python33\lib\s= ite-packages\scipy\optimize\__init__.py", line 147, in <module><= u>

=C2=A0=C2=A0=C2=A0 from ._minimize import= *

=C2=A0 File &q= uot;K:\Python33\lib\site-packages\scipy\optimize\_minimize.py", line 2= 9, in <module>

=C2=A0=C2=A0=C2=A0 from .lbfgsb import _m= inimize_lbfgsb

= =C2=A0 File "K:\Python33\lib\site-packages\scipy\optimize\lbfgsb.py&qu= ot;, line 40, in <module>

=C2=A0=C2=A0=C2=A0 from . import _lbfgsb<= u>

ImportError: DLL = load failed: The specified module could not be found.<= /p>

=C2=A0


Looking at the paths, it looks like some packag= es are for p 2.7 and some for p 3.3

=C2=A0

I=E2=80=99ve checked the path, and the file lbfgs= b.py is definitely at that location (as are optimize.py and _minimize.py).= =C2=A0 Does anyone know why I=E2=80=99m getting the error?

=C2=A0

All the best,

Rob

=C2=A0

=C2=A0

=C2=A0

Robert Flintham
Train= ee Clinical Scientist - MRI
=

Tel:

=C2=A0+44 (0)121 371 7000

= Email:=

=C2=A0Robert.Flintham@uhb.nhs.uk=

= Web:

=C2=A0h= ttp://www.uhb.nhs.uk


We=E2=80=99re bringing the world's most advanc= ed cancer treatments to Birmingham.
Find out more at www.qecancerappeal.org or text <= /span>
QEHB01 =C2=A35 to 70070<= span style=3D"font-size:10.0pt;font-family:"Arial","sans-ser= if";color:red"> to donate =C2=A35 to our appeal.


RRPPS
Medical Physics - Univer= sity Hospitals Birmingham NHS Foundation Trust
63 Melchett Road, Kings N= orton,
Birmingham, B30 3HP




DISCLAIMER:=
This=C2=A0email=C2=A0and=C2=A0any=C2=A0attachments=C2=A0hereto=C2=A0contain= s=C2=A0proprietary=C2=A0information,=C2=A0some=C2=A0or=C2=A0all=C2=A0of=C2= =A0which=C2=A0may=C2=A0be=C2=A0confidential=C2=A0or=C2=A0legally=C2=A0privi= leged.=C2=A0It=C2=A0is=C2=A0for=C2=A0the=C2=A0exclusive=C2=A0use=C2=A0of=C2= =A0the=C2=A0intended=C2=A0recipient(s)=C2=A0only.=C2=A0If=C2=A0an=C2=A0addr= essing=C2=A0or=C2=A0transmission=C2=A0error=C2=A0has=C2=A0misdirected=C2=A0= this=C2=A0e-mail=C2=A0and=C2=A0you=C2=A0are=C2=A0not=C2=A0the=C2=A0intended= =C2=A0recipient(s),=C2=A0please=C2=A0notify=C2=A0the=C2=A0author=C2=A0by=C2= =A0replying=C2=A0to=C2=A0this=C2=A0e-mail.=C2=A0If=C2=A0you=C2=A0are=C2=A0n= ot=C2=A0the=C2=A0intended=C2=A0recipient=C2=A0you=C2=A0must=C2=A0not=C2=A0u= se,=C2=A0disclose,=C2=A0distribute,=C2=A0copy,=C2=A0print,=C2=A0or=C2=A0rel= y=C2=A0on=C2=A0this=C2=A0e-mail=C2=A0or=C2=A0any=C2=A0attachments,=C2=A0as= =C2=A0this=C2=A0may=C2=A0be=C2=A0unlawful.

--
http://mail.python.org/mailman/listinfo/python-list




--
Joel Goldstick
http://joelgoldstick.com
--f46d043d67712b06f204d848b96b-- --f46d043d67712b06f404d848b96c Content-Type: image/gif; name="image001.gif" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: 9ffe0b9f9b94eee6_0.0.1 R0lGODlhyQAoAOYAAIxms9nN5rOZzPbz+ePZ7HBAn+zm85ZzudDA36CAv4Cz5qmNxkCM2XlNprym 0/D2/Maz2SB50qDG7BBwz8DZ8oNZrGbMM2Cg37DQ79Dj9vb88+Ds+TCD1nCp4qDfgLPmmZC86YzZ ZlCW3Jbcc4PWWbzpptnyzeP22dDvwMbss2Y8knDPQOz55gZiyE2ZxanijR+FnGa4P1/FPIOmeSZS uCxPtR9WvGJFpcbf6VK4T3Nzv19ZshlZvwZswjlJr2ZscnxcrwxfxdnW34yVkqnGoGavRlxJqXnS TVyP1ebp9nBlhTOZf0ZCqJmm2WOM0kafmaycz1I8ojNMsl82nHCMbLbW5mK1iKOz3yOCsobSb4yJ yZOGxoO4bKLclmZZf2aJX2ZGjEmcr3BwgHmT0lk5n8npyXm2X8bZwGam1QBmzGYzmf///wAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5 BAAAAAAALAAAAADJACgAQAf/gGuCg4IBCxVqagUAAga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