ImportError: No module named scipy.ndimage - Solved

Ads

 
 

Share on Google+Share on Google+

Java Coder
ImportError: No module named scipy.ndimage - Solved
3 Answer(s)      10 months ago
Posted in : Linux

Hi,

How to solve following error:

ImportError: No module named scipy.ndimage

This error is coming while running a python program.

Thanks

Ads
View Answers

July 23, 2016 at 11:25 PM


Hello,

This error is coming because scipy python package is not installed on your computer.

Error will resolved if you install scipy package. Following is the command to install scipy on Ubuntu 16.04 LTS:

 sudo apt-get install python-scipy

Thanks



July 23, 2016 at 11:27 PM


Hi,

Here is full log of install python-scipy:

 File "1.py", line 3, in <module>
    from moviepy.video.tools.segmenting import findObjects
  File "/usr/local/lib/python2.7/dist-packages/moviepy/video/tools/segmenting.py", line 2, in <module>
    import scipy.ndimage as ndi
ImportError: No module named scipy.ndimage
[email protected]:~$ 
[email protected]:~$ sudo apt-get install python-scipy
[sudo] password for deepak: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-21 linux-headers-4.4.0-21-generic
  linux-image-4.4.0-21-generic linux-image-extra-4.4.0-21-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  binutils cpp-5 g++-5 gcc-5 gcc-5-base libasan2 libatomic1 libblas-common
  libblas3 libcc1-0 libcilkrts5 libgcc-5-dev libgfortran3 libgomp1 libitm1
  liblapack3 liblsan0 libmpx0 libquadmath0 libstdc++-5-dev libstdc++6 libtsan0
  libubsan0 python-decorator python-imaging python-numpy python-pil
Suggested packages:
  binutils-doc gcc-5-locales g++-5-multilib gcc-5-doc libstdc++6-5-dbg
  gcc-5-multilib libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg
  libasan2-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg
  libmpx0-dbg libquadmath0-dbg libstdc++-5-doc gfortran python-nose
  python-numpy-dbg python-numpy-doc python-pil-doc python-pil-dbg
  python-scipy-doc
The following NEW packages will be installed:
  libblas-common libblas3 libgfortran3 liblapack3 python-decorator
  python-imaging python-numpy python-pil python-scipy
The following packages will be upgraded:
  binutils cpp-5 g++-5 gcc-5 gcc-5-base libasan2 libatomic1 libcc1-0
  libcilkrts5 libgcc-5-dev libgomp1 libitm1 liblsan0 libmpx0 libquadmath0
  libstdc++-5-dev libstdc++6 libtsan0 libubsan0
19 upgraded, 9 newly installed, 0 to remove and 173 not upgraded.
Need to get 45.3 MB of archives.
After this operation, 57.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcc1-0 amd64 5.4.0-6ubuntu1~16.04.1 [38.8 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 binutils amd64 2.26.1-1ubuntu1~16.04.1 [2,308 kB]
Get:3 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgomp1 amd64 5.4.0-6ubuntu1~16.04.1 [55.0 kB]
Get:4 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libitm1 amd64 5.4.0-6ubuntu1~16.04.1 [27.5 kB]
Get:5 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libatomic1 amd64 5.4.0-6ubuntu1~16.04.1 [8,886 B]
Get:6 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libasan2 amd64 5.4.0-6ubuntu1~16.04.1 [264 kB]
Get:7 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 liblsan0 amd64 5.4.0-6ubuntu1~16.04.1 [105 kB]
Get:8 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libtsan0 amd64 5.4.0-6ubuntu1~16.04.1 [244 kB]
Get:9 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libubsan0 amd64 5.4.0-6ubuntu1~16.04.1 [95.3 kB]
Get:10 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcilkrts5 amd64 5.4.0-6ubuntu1~16.04.1 [40.1 kB]
Get:11 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libmpx0 amd64 5.4.0-6ubuntu1~16.04.1 [9,760 B]
Get:12 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libquadmath0 amd64 5.4.0-6ubuntu1~16.04.1 [131 kB]
Get:13 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 g++-5 amd64 5.4.0-6ubuntu1~16.04.1 [8,432 kB]
Get:14 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libstdc++-5-dev amd64 5.4.0-6ubuntu1~16.04.1 [1,429 kB]
Get:15 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgcc-5-dev amd64 5.4.0-6ubuntu1~16.04.1 [2,231 kB]
Get:16 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 gcc-5 amd64 5.4.0-6ubuntu1~16.04.1 [8,551 kB]
Get:17 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 cpp-5 amd64 5.4.0-6ubuntu1~16.04.1 [7,786 kB]
Get:18 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 gcc-5-base amd64 5.4.0-6ubuntu1~16.04.1 [16.6 kB]
Get:19 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libstdc++6 amd64 5.4.0-6ubuntu1~16.04.1 [393 kB]
Get:20 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 libblas-common amd64 3.6.0-2ubuntu2 [5,342 B]
Get:21 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 libblas3 amd64 3.6.0-2ubuntu2 [147 kB]
Get:22 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgfortran3 amd64 5.4.0-6ubuntu1~16.04.1 [260 kB]
Get:23 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 liblapack3 amd64 3.6.0-2ubuntu2 [1,938 kB]
Get:24 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 python-decorator all 4.0.6-1 [9,326 B]
Get:25 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 python-pil amd64 3.1.2-0ubuntu1 [312 kB]
Get:26 http://in.archive.ubuntu.com/ubuntu xenial/universe amd64 python-imaging all 3.1.2-0ubuntu1 [4,470 B]
Get:27 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 python-numpy amd64 1:1.11.0-1ubuntu1 [1,763 kB]
Get:28 http://in.archive.ubuntu.com/ubuntu xenial/universe amd64 python-scipy amd64 0.17.0-1 [8,733 kB]
Fetched 45.3 MB in 3min 59s (189 kB/s)                                         
(Reading database ... 245431 files and directories currently installed.)
Preparing to unpack .../libcc1-0_5.4.0-6ubuntu1~16.04.1_amd64.deb ...
Unpacking libcc1-0:amd64 (5.4.0-6ubuntu1~16.04.1) over (5.3.1-14ubuntu2.1) ...
Preparing to unpack .../binutils_2.26.1-1ubuntu1~16.04.1_amd64.deb ...
Unpacking binutils (2.26.1-1ubuntu1~16.04.1) over (2.26-8ubuntu2.1) ...
Preparing to unpack .../libgomp1_5.4.0-6ubuntu1~16.04.1_amd64.deb ...
Unpacking libgomp1:amd64 (5.4.0-6ubuntu1~16.04.1) over (5.3.1-14ubuntu2.1) ...
Preparing to unpack .../libitm1_5.4.0-6ubuntu1~16.04.1_amd64.deb ...
Unpacking libitm1:amd64 (5.4.0-6ubuntu1~16.04.1) over (5.3.1-14ubuntu2.1) ...
Preparing to unpack .../libatomic1_5.4.0-6ubuntu1~16.04.1_amd64.deb ...
Unpacking libatomic1:amd64 (5.4.0-6ubuntu1~16.04.1) over (5.3.1-14ubuntu2.1) ...
Preparing to unpack .../libasan2_5.4.0-6ubuntu1~16.04.1_amd64.deb ...
Unpacking libasan2:amd64 (5.4.0-6ubuntu1~16.04.1) over (5.3.1-14ubuntu2.1) ...
Preparing to unpack .../liblsan0_5.4.0-6ubuntu1~16.04.1_amd64.deb ...
Unpacking liblsan0:amd64 (5.4.0-6ubuntu1~16.04.1) over (5.3.1-14ubuntu2.1) ...
Preparing to unpack .../libtsan0_5.4.0-6ubuntu1~16.04.1_amd64.deb ...
Unpacking libtsan0:amd64 (5.4.0-6ubuntu1~16.04.1) over (5.3.1-14ubuntu2.1) ...
Preparing to unpack .../libubsan0_5.4.0-6ubuntu1~16.04.1_amd64.deb ...
Unpacking libubsan0:amd64 (5.4.0-6ubuntu1~16.04.1) over (5.3.1-14ubuntu2.1) ...
Preparing to unpack .../libcilkrts5_5.4.0-6ubuntu1~16.04.1_amd64.deb ...
Unpacking libcilkrts5:amd64 (5.4.0-6ubuntu1~16.04.1) over (5.3.1-14ubuntu2.1) ...
Preparing to unpack .../libmpx0_5.4.0-6ubuntu1~16.04.1_amd64.deb ...
Unpacking libmpx0:amd64 (5.4.0-6ubuntu1~16.04.1) over (5.3.1-14ubuntu2.1) ...
Preparing to unpack .../libquadmath0_5.4.0-6ubuntu1~16.04.1_amd64.deb ...
Unpacking libquadmath0:amd64 (5.4.0-6ubuntu1~16.04.1) over (5.3.1-14ubuntu2.1) ...
Preparing to unpack .../g++-5_5.4.0-6ubuntu1~16.04.1_amd64.deb ...
Unpacking g++-5 (5.4.0-6ubuntu1~16.04.1) over (5.3.1-14ubuntu2.1) ...
Preparing to unpack .../libstdc++-5-dev_5.4.0-6ubuntu1~16.04.1_amd64.deb ...
Unpacking libstdc++-5-dev:amd64 (5.4.0-6ubuntu1~16.04.1) over (5.3.1-14ubuntu2.1) ...
Preparing to unpack .../libgcc-5-dev_5.4.0-6ubuntu1~16.04.1_amd64.deb ...
Unpacking libgcc-5-dev:amd64 (5.4.0-6ubuntu1~16.04.1) over (5.3.1-14ubuntu2.1) ...
Preparing to unpack .../gcc-5_5.4.0-6ubuntu1~16.04.1_amd64.deb ...
Unpacking gcc-5 (5.4.0-6ubuntu1~16.04.1) over (5.3.1-14ubuntu2.1) ...
Preparing to unpack .../cpp-5_5.4.0-6ubuntu1~16.04.1_amd64.deb ...
Unpacking cpp-5 (5.4.0-6ubuntu1~16.04.1) over (5.3.1-14ubuntu2.1) ...
Preparing to unpack .../gcc-5-base_5.4.0-6ubuntu1~16.04.1_amd64.deb ...
Unpacking gcc-5-base:amd64 (5.4.0-6ubuntu1~16.04.1) over (5.3.1-14ubuntu2.1) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up gcc-5-base:amd64 (5.4.0-6ubuntu1~16.04.1) ...
(Reading database ... 245434 files and directories currently installed.)
Preparing to unpack .../libstdc++6_5.4.0-6ubuntu1~16.04.1_amd64.deb ...
Unpacking libstdc++6:amd64 (5.4.0-6ubuntu1~16.04.1) over (5.3.1-14ubuntu2.1) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Setting up libstdc++6:amd64 (5.4.0-6ubuntu1~16.04.1) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Selecting previously unselected package libblas-common.
(Reading database ... 245434 files and directories currently installed.)
Preparing to unpack .../libblas-common_3.6.0-2ubuntu2_amd64.deb ...
Unpacking libblas-common (3.6.0-2ubuntu2) ...
Selecting previously unselected package libblas3.
Preparing to unpack .../libblas3_3.6.0-2ubuntu2_amd64.deb ...
Unpacking libblas3 (3.6.0-2ubuntu2) ...
Selecting previously unselected package libgfortran3:amd64.
Preparing to unpack .../libgfortran3_5.4.0-6ubuntu1~16.04.1_amd64.deb ...
Unpacking libgfortran3:amd64 (5.4.0-6ubuntu1~16.04.1) ...
Selecting previously unselected package liblapack3.
Preparing to unpack .../liblapack3_3.6.0-2ubuntu2_amd64.deb ...
Unpacking liblapack3 (3.6.0-2ubuntu2) ...
Selecting previously unselected package python-decorator.
Preparing to unpack .../python-decorator_4.0.6-1_all.deb ...
Unpacking python-decorator (4.0.6-1) ...
Selecting previously unselected package python-pil:amd64.
Preparing to unpack .../python-pil_3.1.2-0ubuntu1_amd64.deb ...
Unpacking python-pil:amd64 (3.1.2-0ubuntu1) ...
Selecting previously unselected package python-imaging.
Preparing to unpack .../python-imaging_3.1.2-0ubuntu1_all.deb ...
Unpacking python-imaging (3.1.2-0ubuntu1) ...
Selecting previously unselected package python-numpy.
Preparing to unpack .../python-numpy_1%3a1.11.0-1ubuntu1_amd64.deb ...
Unpacking python-numpy (1:1.11.0-1ubuntu1) ...
Selecting previously unselected package python-scipy.
Preparing to unpack .../python-scipy_0.17.0-1_amd64.deb ...
Unpacking python-scipy (0.17.0-1) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libcc1-0:amd64 (5.4.0-6ubuntu1~16.04.1) ...
Setting up binutils (2.26.1-1ubuntu1~16.04.1) ...
Setting up libgomp1:amd64 (5.4.0-6ubuntu1~16.04.1) ...
Setting up libitm1:amd64 (5.4.0-6ubuntu1~16.04.1) ...
Setting up libatomic1:amd64 (5.4.0-6ubuntu1~16.04.1) ...
Setting up libasan2:amd64 (5.4.0-6ubuntu1~16.04.1) ...
Setting up liblsan0:amd64 (5.4.0-6ubuntu1~16.04.1) ...
Setting up libtsan0:amd64 (5.4.0-6ubuntu1~16.04.1) ...
Setting up libubsan0:amd64 (5.4.0-6ubuntu1~16.04.1) ...
Setting up libcilkrts5:amd64 (5.4.0-6ubuntu1~16.04.1) ...
Setting up libmpx0:amd64 (5.4.0-6ubuntu1~16.04.1) ...
Setting up libquadmath0:amd64 (5.4.0-6ubuntu1~16.04.1) ...
Setting up cpp-5 (5.4.0-6ubuntu1~16.04.1) ...
Setting up libgcc-5-dev:amd64 (5.4.0-6ubuntu1~16.04.1) ...
Setting up gcc-5 (5.4.0-6ubuntu1~16.04.1) ...
Setting up libstdc++-5-dev:amd64 (5.4.0-6ubuntu1~16.04.1) ...
Setting up g++-5 (5.4.0-6ubuntu1~16.04.1) ...
Setting up libblas-common (3.6.0-2ubuntu2) ...
Setting up libblas3 (3.6.0-2ubuntu2) ...
update-alternatives: using /usr/lib/libblas/libblas.so.3 to provide /usr/lib/libblas.so.3 (libblas.so.3) in auto mode
Setting up libgfortran3:amd64 (5.4.0-6ubuntu1~16.04.1) ...
Setting up liblapack3 (3.6.0-2ubuntu2) ...
update-alternatives: using /usr/lib/lapack/liblapack.so.3 to provide /usr/lib/liblapack.so.3 (liblapack.so.3) in auto mode
Setting up python-decorator (4.0.6-1) ...
Setting up python-pil:amd64 (3.1.2-0ubuntu1) ...
Setting up python-imaging (3.1.2-0ubuntu1) ...
Setting up python-numpy (1:1.11.0-1ubuntu1) ...
Setting up python-scipy (0.17.0-1) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...

Thanks



July 25, 2016 at 8:32 AM


Check following video:

Thanks


Ads









Related Tutorials/Questions & Answers:
Admin Module
Admin Module The admin have the privilege  to add the question, delete the question. He is responsible for maintaining the site. He can also search the question paper by question Id and by title. The Admin does the following
User Module
User Module The user first need to make registration on the website for appearing in the online examination. After the making successful registration he is eligible for online test examination. To appear in the examination he need
Advertisements
spring JEE module tutorial
spring JEE module tutorial  Hi, I want spring Jee module tutorial and spring ORM module tutorial plz send me
spring DAO module turorial
spring DAO module turorial  how to integrate springDAO and spring webMVC
login module program
login module program  hello friends i want to develop the web service using .net pls send the login ejb module .net program to my mail id
login module program
login module program  hello friends i want to develop the web service using .net pls send the login ejb module .net program to my mail id
Structure of Web Module
In this section, you will learn the structure of the web module
Module In An Application
are as follows- Customer Module Customer Registration Customer Login.... and save information Admin Module Add Update Delete Search Add Scheme on The Product Generate Report of Product Shipping Module View Shipping
what is separate request processor per module in struts1
what is separate request processor per module in struts1  what is separae request processor per module in struts1.x
what is separate request processor per module in struts1
what is separate request processor per module in struts1  what is separae request processor per module in struts1.x
Hibernate named queries
Hibernate named queries  Hi, What is named queries in Hibernate? Thanks
a class named Transactions
a class named Transactions  Write this java code for me: a class named Transactions that holds the memo and the amount of a transaction. Prompt the user for the number of transactions and create a new Transaction object
How to fix HAX Kernel Module Is Not Installed error?
How to fix HAX Kernel Module Is Not Installed error?  Hi, How to fix HAX Kernel Module Is Not Installed error? Android studio gives following error...: HAX kernel module is not installed! Thanks   Check following video
Design a class named account
Design a class named account  The class contains: § An int data field named id for the account (default 0). § A double data field named balance for the account (default 0.0) § A double data field named annualInterestRate
How Spring MVC Module Works
of Spring MVC module. The Spring MVC modules comes with the Spring
Database named studentinfo
Database named studentinfo  1.create design of studentinfo using swing component 2.Create a database named student info. 3.create a table that stores all the details from the form,application of basic Normalization is required
Database named studentinfo
Database named studentinfo  1.create design of studentinfo using swing component 2.Create a database named student info. 3.create a table that stores all the details from the form,application of basic Normalization is required
Database named studentinfo
Database named studentinfo  1.create design of studentinfo using swing component 2.Create a database named student info. 3.create a table that stores all the details from the form,application of basic Normalization is required
Named ? SQL query in hibernate
Named ? SQL query in hibernate  What is Named SQL query in hibernate?   You can put all the HQL into the XML mapping file rather than putting the sql queries to various places in between code. sample.hbm.xml <
Error: Cannot find module 'jasmine-core'
Error: Cannot find module 'jasmine-core'  Hi, I am trying to make...: karma start Its throwing following error: Error: Cannot find module 'jasmine...; ^ Error: Cannot find module 'jasmine-core' at Function.Module.
Hibernate Named Query
This section contain description of named query with example
ModuleManager for load or unload module in Flex 3
Load module with the help of ModuleManager class:- In this example, we will used module manager to load and unload modules in the application. It is loaded module with the help of  IModuleInfo interface by using the ModuleManager
struts url problem in Switching module using SwitchAction class - Struts
struts url problem in Switching module using SwitchAction class  when... from my login module to admin module it shows the url of login module after going in admin module but it goes successfully to admin module
create named class - Java Beginners
create named class  Can you check my [email protected]: How to create a class named Employee with name and salary. Make a class Manager inherit from Employee with an instance field named department. Supply a method toString
Spring JDBC, Spring JDBC Module, Spring JDBC Tutorial
The Spring JDBC provides consistent access to the various database access technologies including JDBC, Hibernate, JPA or JDO. In this Spring JDBC tutorial we will learn how to use the JDBC module to access and manipulate databases
JPA setParameter (Named Parameter)
JPA setParameter (Named Parameter)   ... API's method setParameter as a named parameter. JPA Query API's supports two types of setParameter.  1. Named Parameters  2. Numbered Parameters
Hibernate Named Native SQL Query
In this section, you will learn Named Native SQL Query in Hibernate
Hibernate Named HQL in Annotation
In this section, you will learn how to execute Named HQL written in Model class Annotation