Search code examples
python-3.xmultiprocessingpython-multiprocessing

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 ?


Solution

  • 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