Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python multiprocessing installation: Command "python setup.py egg_info" failed with error code 1

Trying to install:

     pip install multiprocessing

Getting an error:

Collecting multiprocessing
Using cached multiprocessing-2.6.2.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/var/folders/7s/sswmssj51p73hky4mkqs4_zc0000gn/T/pip-build-8c0dk6ai/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 /private/var/folders/7s/sswmssj51p73hky4mkqs4_zc0000gn/T/pip-build-8c0dk6ai/multiprocessing/

Anyone knows the way to fix this?

like image 807
Massyanya Avatar asked Mar 03 '17 00:03

Massyanya


People also ask

How do I install Python setuptools?

Follow the below steps to install the Setuptools package on Linux using the setup.py file: Step 1: Download the latest source package of Setuptools for Python3 from the website. Step 3: Go to the setuptools-60.5. 0 folder and enter the following command to install the package.

How do I install unroll?

If it is missing, then use the following code to install it - pip install ez_setup. Then type in this code- pip install unroll. If all this does not work, then maybe pip did not install or upgrade setup_tools properly. In that case, you can try this code: easy_install -U setuptools.

How do I download pip3 on Linux?

To install pip3 on Ubuntu or Debian Linux, open a new Terminal window and enter sudo apt-get install python3-pip . To install pip3 on Fedora Linux, enter sudo yum install python3-pip into a Terminal window. You will need to enter the administrator password for your computer in order to install this software.


3 Answers

In short: Multiprocessing is already pre-installed in python 3, no need to install it.

I found an answer to my question and it's a silly one - multiprocessing is already pre-installed in my version of Python (3.5.2) by default.

It won't show up in the list of packages in Anaconda >> Environments >> root, as it's not a third party package but an internal one.

If anyone is not sure whether this applies to you, just check from multiprocessing import Pool in your Python console.

This is true of all currently supported versions of Python (2.7 and 3.x) and according to a Python maintainer/contributor multiprocessing has been part of the standard library (batteries included) since Python 2.6. https://bugs.python.org/msg326646

You won't need to do a pip install multiprocessing anymore and do NOT include it in your requirements.txt unless you are maintaining a Python 2.4/2.5 application (please migrate!). On most versions you can just import multiprocessing and you should be fine.

like image 152
Massyanya Avatar answered Oct 16 '22 20:10

Massyanya


Instead of pip install multiprocessing type instead:

pip install multiprocess
like image 37
3 revs, 2 users 50% Avatar answered Oct 16 '22 21:10

3 revs, 2 users 50%


Of course you are trying to install multiprocessing library on python3 while this library is installed on python3 by default and doesn't need to install again. Be Lucky

like image 1
Arashsyh Avatar answered Oct 16 '22 19:10

Arashsyh