Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

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)      11 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:
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
Advertisements
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
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 <
Hibernate Named Query
This section contain description of named query with example
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
Hibernate Named Native SQL Query
In this section, you will learn Named Native SQL Query in Hibernate
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 HQL in Annotation
In this section, you will learn how to execute Named HQL written in Model class Annotation
named parameters vs postional parameters - Hibernate
named parameters vs postional parameters  hi,Can you please explain why we i should go for particular parameters or positional parameter... regards, somasekhar
JPA Named Parameter List
JPA Named Parameter List   ... application using JPA Named Parameter List. This is similar as named parameter but here we use the an array list as named parameter.  Named Parameter List
Hibernate Named HQL using XML Mapping
In this section, you will learn executing Named HQL written in XML Mapping file
JPA Named Parameter
JPA Named Parameter       In this section, you will learn how to use JPA Named Parameter in your jpa application. In JPA named parameter is used where you assign names
JPA Named Queries
JPA Named Queries       In this section, you will know about the JPA Named Queries...;) }) For developing JPA Named Queries, you need the following files
Hibernate Named Native SQL in Annotation
In this section, you will learn how to execute the Named Native SQL written in Model class Annotation
exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'transactionManager' is defined
exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'transactionManager' is defined  Hi, In my web... is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'transactionManager' is defined
Write a program named InternetCharge_YourLastName that do the following:
Write a program named InternetCharge_YourLastName that do the following: ... per month unlimited access is provided. Write a program named InternetCharge.... Instruction: We should have two classes class named InternetService
Hibernate Named Query
Hibernate Named Query       Named Query is very useful concept in hibernate. It lets...;   Calling Named Query in the coding section You can call
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
This is a versatile shade of blue named Turquoise.
:5px 0px 5px 5px; } This is a versatile shade of blue named Turquoise. Here
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
Hibernate Named Native SQL in XML Returning Scalar
In this section, you will learn to execute Hibernate named native SQL query written in XML mapping file which return scalar values(raw values
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
Hibernate Named Native SQL Query using XML Mapping
In this section, you will learn Named Native SQL Query using XML Mapping in Hibernate with an example
Structure of Web Module
In this section, you will learn the structure of the web module