Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pynacl install fails ERROR: The 'make' utility is missing from PATH #476

Closed
ricardovm91 opened this issue Sep 26, 2018 · 6 comments
Closed

Comments

@ricardovm91
Copy link

Hello, when installing pynacl v 1.3.0 building a Dockerfile I get the next error:

Collecting pynacl
  Downloading https://files.pythonhosted.org/packages/61/ab/2ac6dea8489fa713e2b4c6c5b549cc962dd4a842b5998d9e80cf8440b7cd/PyNaCl-1.3.0.tar.gz (3.4MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
Collecting six (from pynacl)
  Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting cffi>=1.4.1 (from pynacl)
  Using cached https://files.pythonhosted.org/packages/6d/c0/47db8f624f3e4e2f3f27be03a93379d1ba16a1450a7b1aacfa0366e2c0dd/cffi-1.11.5-cp36-cp36m-manylinux1_x86_64.whl
Collecting pycparser (from cffi>=1.4.1->pynacl)
Building wheels for collected packages: pynacl
  Running setup.py bdist_wheel for pynacl: started
  Running setup.py bdist_wheel for pynacl: finished with status 'error'
  Complete output from command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-3djfemi7/pynacl/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-9lu2e4sj --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/nacl
  copying src/nacl/exceptions.py -> build/lib.linux-x86_64-3.6/nacl
  copying src/nacl/__init__.py -> build/lib.linux-x86_64-3.6/nacl
  copying src/nacl/secret.py -> build/lib.linux-x86_64-3.6/nacl
  copying src/nacl/hash.py -> build/lib.linux-x86_64-3.6/nacl
  copying src/nacl/hashlib.py -> build/lib.linux-x86_64-3.6/nacl
  copying src/nacl/encoding.py -> build/lib.linux-x86_64-3.6/nacl
  copying src/nacl/utils.py -> build/lib.linux-x86_64-3.6/nacl
  copying src/nacl/signing.py -> build/lib.linux-x86_64-3.6/nacl
  copying src/nacl/public.py -> build/lib.linux-x86_64-3.6/nacl
  creating build/lib.linux-x86_64-3.6/nacl/pwhash
  copying src/nacl/pwhash/__init__.py -> build/lib.linux-x86_64-3.6/nacl/pwhash
  copying src/nacl/pwhash/argon2i.py -> build/lib.linux-x86_64-3.6/nacl/pwhash
  copying src/nacl/pwhash/argon2id.py -> build/lib.linux-x86_64-3.6/nacl/pwhash
  copying src/nacl/pwhash/_argon2.py -> build/lib.linux-x86_64-3.6/nacl/pwhash
  copying src/nacl/pwhash/scrypt.py -> build/lib.linux-x86_64-3.6/nacl/pwhash
  creating build/lib.linux-x86_64-3.6/nacl/bindings
  copying src/nacl/bindings/crypto_shorthash.py -> build/lib.linux-x86_64-3.6/nacl/bindings
  copying src/nacl/bindings/__init__.py -> build/lib.linux-x86_64-3.6/nacl/bindings
  copying src/nacl/bindings/sodium_core.py -> build/lib.linux-x86_64-3.6/nacl/bindings
  copying src/nacl/bindings/crypto_secretbox.py -> build/lib.linux-x86_64-3.6/nacl/bindings
  copying src/nacl/bindings/crypto_scalarmult.py -> build/lib.linux-x86_64-3.6/nacl/bindings
  copying src/nacl/bindings/crypto_aead.py -> build/lib.linux-x86_64-3.6/nacl/bindings
  copying src/nacl/bindings/crypto_generichash.py -> build/lib.linux-x86_64-3.6/nacl/bindings
  copying src/nacl/bindings/crypto_kx.py -> build/lib.linux-x86_64-3.6/nacl/bindings
  copying src/nacl/bindings/randombytes.py -> build/lib.linux-x86_64-3.6/nacl/bindings
  copying src/nacl/bindings/utils.py -> build/lib.linux-x86_64-3.6/nacl/bindings
  copying src/nacl/bindings/crypto_secretstream.py -> build/lib.linux-x86_64-3.6/nacl/bindings
  copying src/nacl/bindings/crypto_hash.py -> build/lib.linux-x86_64-3.6/nacl/bindings
  copying src/nacl/bindings/crypto_box.py -> build/lib.linux-x86_64-3.6/nacl/bindings
  copying src/nacl/bindings/crypto_sign.py -> build/lib.linux-x86_64-3.6/nacl/bindings
  copying src/nacl/bindings/crypto_pwhash.py -> build/lib.linux-x86_64-3.6/nacl/bindings
  running build_clib
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-3djfemi7/pynacl/setup.py", line 255, in <module>
      "Programming Language :: Python :: 3.7",
    File "/tmp/pip-build-env-gfd40y3_/lib/python3.6/site-packages/setuptools/__init__.py", line 140, in setup
      return distutils.core.setup(**attrs)
    File "/usr/local/lib/python3.6/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/local/lib/python3.6/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-gfd40y3_/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 202, in run
      self.run_command('build')
    File "/usr/local/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/usr/local/lib/python3.6/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/local/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/tmp/pip-install-3djfemi7/pynacl/setup.py", line 159, in run
      raise Exception("ERROR: The 'make' utility is missing from PATH")
  Exception: ERROR: The 'make' utility is missing from PATH
  
  ----------------------------------------
  Failed building wheel for pynacl
  Running setup.py clean for pynacl
Failed to build pynacl
Installing collected packages: six, pycparser, cffi, pynacl
  Running setup.py install for pynacl: started
    Running setup.py install for pynacl: finished with status 'error'
    Complete output from command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-3djfemi7/pynacl/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ksyt9tor/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/nacl
    copying src/nacl/exceptions.py -> build/lib.linux-x86_64-3.6/nacl
    copying src/nacl/__init__.py -> build/lib.linux-x86_64-3.6/nacl
    copying src/nacl/secret.py -> build/lib.linux-x86_64-3.6/nacl
    copying src/nacl/hash.py -> build/lib.linux-x86_64-3.6/nacl
    copying src/nacl/hashlib.py -> build/lib.linux-x86_64-3.6/nacl
    copying src/nacl/encoding.py -> build/lib.linux-x86_64-3.6/nacl
    copying src/nacl/utils.py -> build/lib.linux-x86_64-3.6/nacl
    copying src/nacl/signing.py -> build/lib.linux-x86_64-3.6/nacl
    copying src/nacl/public.py -> build/lib.linux-x86_64-3.6/nacl
    creating build/lib.linux-x86_64-3.6/nacl/pwhash
    copying src/nacl/pwhash/__init__.py -> build/lib.linux-x86_64-3.6/nacl/pwhash
    copying src/nacl/pwhash/argon2i.py -> build/lib.linux-x86_64-3.6/nacl/pwhash
    copying src/nacl/pwhash/argon2id.py -> build/lib.linux-x86_64-3.6/nacl/pwhash
    copying src/nacl/pwhash/_argon2.py -> build/lib.linux-x86_64-3.6/nacl/pwhash
    copying src/nacl/pwhash/scrypt.py -> build/lib.linux-x86_64-3.6/nacl/pwhash
    creating build/lib.linux-x86_64-3.6/nacl/bindings
    copying src/nacl/bindings/crypto_shorthash.py -> build/lib.linux-x86_64-3.6/nacl/bindings
    copying src/nacl/bindings/__init__.py -> build/lib.linux-x86_64-3.6/nacl/bindings
    copying src/nacl/bindings/sodium_core.py -> build/lib.linux-x86_64-3.6/nacl/bindings
    copying src/nacl/bindings/crypto_secretbox.py -> build/lib.linux-x86_64-3.6/nacl/bindings
    copying src/nacl/bindings/crypto_scalarmult.py -> build/lib.linux-x86_64-3.6/nacl/bindings
    copying src/nacl/bindings/crypto_aead.py -> build/lib.linux-x86_64-3.6/nacl/bindings
    copying src/nacl/bindings/crypto_generichash.py -> build/lib.linux-x86_64-3.6/nacl/bindings
    copying src/nacl/bindings/crypto_kx.py -> build/lib.linux-x86_64-3.6/nacl/bindings
    copying src/nacl/bindings/randombytes.py -> build/lib.linux-x86_64-3.6/nacl/bindings
    copying src/nacl/bindings/utils.py -> build/lib.linux-x86_64-3.6/nacl/bindings
    copying src/nacl/bindings/crypto_secretstream.py -> build/lib.linux-x86_64-3.6/nacl/bindings
    copying src/nacl/bindings/crypto_hash.py -> build/lib.linux-x86_64-3.6/nacl/bindings
    copying src/nacl/bindings/crypto_box.py -> build/lib.linux-x86_64-3.6/nacl/bindings
    copying src/nacl/bindings/crypto_sign.py -> build/lib.linux-x86_64-3.6/nacl/bindings
    copying src/nacl/bindings/crypto_pwhash.py -> build/lib.linux-x86_64-3.6/nacl/bindings
    running build_clib
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-3djfemi7/pynacl/setup.py", line 255, in <module>
        "Programming Language :: Python :: 3.7",
      File "/tmp/pip-build-env-gfd40y3_/lib/python3.6/site-packages/setuptools/__init__.py", line 140, in setup
        return distutils.core.setup(**attrs)
      File "/usr/local/lib/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/local/lib/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/tmp/pip-build-env-gfd40y3_/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/local/lib/python3.6/distutils/command/install.py", line 545, in run
        self.run_command('build')
      File "/usr/local/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/local/lib/python3.6/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/local/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/tmp/pip-install-3djfemi7/pynacl/setup.py", line 159, in run
        raise Exception("ERROR: The 'make' utility is missing from PATH")
    Exception: ERROR: The 'make' utility is missing from PATH
    
    ----------------------------------------
Command "/usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-3djfemi7/pynacl/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ksyt9tor/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-3djfemi7/pynacl/
The command '/bin/sh -c pip install pynacl' returned a non-zero code: 1

My Dockerfile looks like this:

FROM python:3.6-slim

RUN pip install --upgrade pip

RUN mkdir /app
WORKDIR /app
COPY ./app /app

RUN pip install Flask
RUN pip install gunicorn
RUN pip install pynacl

CMD gunicorn app:app --bind 0.0.0.0:$PORT --reload

I ended up fixing it by running RUN pip install pynacl==1.2.1.

Any ideas why is this happening?

@beezz
Copy link

beezz commented Sep 27, 2018

The reason why this suddenly is a problem is missing manylinux wheels for python3 in pypi for the new version (1.3.0).

@reaperhulk
Copy link
Member

Yep, this is a manylinux1 issue. We don't have the abi3 wheels due to a change in tooling that caused a problem. I'll be fixing this once I get some sleep.

@ricardovm91
Copy link
Author

Thank you! Looking forward for the fix.

@reaperhulk
Copy link
Member

manylinux1 py3 wheels are now up

@pe2mbs
Copy link

pe2mbs commented May 6, 2019

for Windows this fix is needed in the setup.py where function
exts = list(filter(None, os.environ.get('PATHEXT', '').split(os.pathsep)))

@reaperhulk
Copy link
Member

If you see an error like this on Windows you need to upgrade your pip so that it is capable of downloading a binary wheel. python -m pip install -U pip will do it. Then pip install pynacl will install without issues.

@pyca pyca locked and limited conversation to collaborators May 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

4 participants