0

I am a newbie and I need your help!!

I have installed scipy on my Ubuntu.

When I ran the code from scipy import optimize, special

I get the following in terminal: can't read /var/mail/scipy.optimize

and if I type python, and get >>> then type in from scipy import optimize

then I ran code including scipy, optimize, I get the following: name 'scipy' is not defined

Chen Luying
  • 9
  • 1
  • 2
  • The first problem is a duplicate of https://stackoverflow.com/questions/16069816/getting-python-error-from-cant-read-var-mail-bio; the second is simply that you have not installed `scipy` – tripleee Jun 13 '22 at 05:01

1 Answers1

3

from scipy import optimize, special on the shell prompt starts the from command, which is an email program.

from scipy import optimize, special in Python will put the modules optimize and special in your namespace, but not scipy. Either use them unqualified or do import scipy instead.

Fred Foo
  • 355,277
  • 75
  • 744
  • 836