Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #41517 > unrolled thread
| Started by | Robert Flintham <Robert.Flintham@uhb.nhs.uk> |
|---|---|
| First post | 2013-03-19 15:10 +0000 |
| Last post | 2013-03-20 01:50 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
"module could not be found" error Robert Flintham <Robert.Flintham@uhb.nhs.uk> - 2013-03-19 15:10 +0000
Re: "module could not be found" error Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-03-20 01:50 +0000
| From | Robert Flintham <Robert.Flintham@uhb.nhs.uk> |
|---|---|
| Date | 2013-03-19 15:10 +0000 |
| Subject | "module could not be found" error |
| Message-ID | <mailman.3517.1363705854.2939.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
Hi,
I'm trying to run the following, with <an array> representing an array of floating point numbers:
------------------------------------------------------------
import numpy as np
import scipy as sp
from scipy import optimize
xdata=<an array>
ydata=<an array>
def t2fit(x,T2,A):
return A * np.exp(-x/T2)
popt, pcov = optimize.curve_fit(t2fit, xdata, ydata, p0=None, sigma=None)
------------------------------------------------------------
But I'm 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 <module>
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_execfile.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 <module>
from scipy import optimize
File "K:\Python33\lib\site-packages\scipy\optimize\__init__.py", line 147, in <module>
from ._minimize import *
File "K:\Python33\lib\site-packages\scipy\optimize\_minimize.py", line 29, in <module>
from .lbfgsb import _minimize_lbfgsb
File "K:\Python33\lib\site-packages\scipy\optimize\lbfgsb.py", line 40, in <module>
from . import _lbfgsb
ImportError: DLL load failed: The specified module could not be found.
I've checked the path, and the file lbfgsb.py is definitely at that location (as are optimize.py and _minimize.py). Does anyone know why I'm 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're bringing the world's most advanced cancer treatments to Birmingham.
Find out more at www.qecancerappeal.org<http://www.qecancerappeal.org> or text QEHB01 £5 to 70070 to donate £5 to our appeal.
RRPPS
Medical Physics - University Hospitals Birmingham NHS Foundation Trust
63 Melchett Road, Kings Norton,
Birmingham, B30 3HP
[cid:image001.gif@01CE24B3.0686DA50]
DISCLAIMER:
This email and any attachments hereto contains proprietary information, some or all of which may be confidential or legally privileged. It is for the exclusive use of the intended recipient(s) only. If an addressing or transmission error has misdirected this e-mail and you are not the intended recipient(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, print, or rely on this e-mail or any attachments, as this may be unlawful.
[toc] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2013-03-20 01:50 +0000 |
| Message-ID | <514915ca$0$30001$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #41517 |
On Tue, 19 Mar 2013 15:10:42 +0000, Robert Flintham wrote:
> <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-
> microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-
> com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/
> omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-
> equiv=Content-Type content="text/html; charset=iso-8859-1"><meta
> name=Generator content="Microsoft Word 12 (filtered medium)"><!--[if !
> mso]><style>v\:* {behavior:url(#default#VML);}
[...snip many more lines of similar junk...]
Hi Robert,
This is a text-only forum, which does not include HTML emails. Is there
any way you can disable sending HTML (so-called "Rich Text") when you
post here? That would be greatly appreciated.
I normally don't say anything, but in your case the HTML posted is
especially bulky and inefficient (it was created by Microsoft Office,
which is known to create lousy HTML code) which makes it particularly
egregious and annoying.
Thank you,
--
Steven
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web