usman1644
usman1644

Reputation: 133

ImportError: No module named 'mutiprocessing'

I am trying to import 'multiprocessing' and using python 3.5.3 but its gives error

Traceback (most recent call last):
  File "ssser.py", line 7, in <module>
    import mutiprocessing
ImportError: No module named 'mutiprocessing'

when i try to install multiprocessing module then i again error occure i am using following command for installation

python3 -m pip install multiprocessing

and got error

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-26ilgzih/multiprocessing/setup.py", line 94
        print 'Macros:'
                      ^
    SyntaxError: Missing parentheses in call to 'print'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-26ilgzih/multiprocessing/

however when i import "import multiprocessing" in terminal then no error occure but when i used in my file "ssscr.py" then it gives error i am using geany,and python3 (IDEL) on raspberry pi3

Can any body help me how i can fix this error ?

Upvotes: 6

Views: 18902

Answers (3)

GChuf
GChuf

Reputation: 2230

The accepted answer did not work for me for python3/pip3. It turns out the code I tried to run, was trying to import multiprocess, not multiprocessing.

So I installed the package multiprocess:

pip3 install multiprocess

Upvotes: 0

santhosh
santhosh

Reputation: 509

For others who faces Similar error like

ModuleNotFoundError: No module named 'multiprocessing';

would also occur if you name your python file as multiprocessing.(as it makes ambiguity between your program name and actual module name) Just rename your file and it will work (if you have dependency installed).

Upvotes: 11

Arghya Saha
Arghya Saha

Reputation: 5713

Seems like you are installing multiprocessing in the python 2 version. Could you use pip3 to install the package?

pip3 install multiprocessing

Also use the following command to check which pip you are using

$ ls -l `which pip`
$ ls -l `which pip3`

And to see if the package got correctly installed or not use

$ pip show pip
$ pip3 show pip

Update: multiprocessing is built-in after python2.6 OP did a typo. It should be import multiprocessing in place of import mutiprocessing

Upvotes: 0

Related Questions