Search code examples
pythonpippython-wheel

Cant install PyNaCl with pip inside a PyCharm venv


Using python3.8.1, installing newest version, on Windows 10:

pip install PyNaCl gives me this error (last 10 lines):

    File "C:\Program Files (x86)\Python3\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "C:\Program Files (x86)\Python3\lib\distutils\dist.py", line 985, in run_command
      cmd_obj.run()
    File "setup.py", line 161, 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
Could not build wheels for PyNaCl which use PEP 517 and cannot be installed directly

It seems to be related to wheels, so i tried to install it with no-binary, which also failed:

      File "C:\Program Files (x86)\Python3\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\Administrator\AppData\Local\Temp\pip-install-q0db5s_n\PyNaCl\setup.py", line 161, in run
        raise Exception("ERROR: The 'make' utility is missing from PATH")
    Exception: ERROR: The 'make' utility is missing from PATH

    ----------------------------------------
Command "C:\Users\Administrator\Documents\DiscordBot\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Administrator\\AppData\\Local\\Temp\\pip-install-q0db5s_n\\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 C:\Users\Administrator\AppData\Local\Temp\pip-record-s27dvlrv\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\Administrator\Documents\DiscordBot\venv\include\site\python3.8\PyNaCl" failed with error code 1 in C:\Users\Administrator\AppData\Local\Temp\pip-install-q0db5s_n\PyNaCl\

EDIT: This only seems to be an issue in my venv (made by Pycharm) - i have no clue what the issue is, both setuptools and wheel are installed.


Solution

  • I ultimately solved it by using python -m pip install --no-use-pep517 pynacl