madzak / python-json-logger

Json Formatter for the standard python logger
BSD 2-Clause "Simplified" License
1.7k stars 231 forks source link

Installation with Python 3.7.7 and Pipenv #106

Closed g-ongenae closed 3 years ago

g-ongenae commented 3 years ago

I cannot install the package with Python 3.7.7 and Pipenv.

I tried the solution from #100, but it doesn't work.

❯ pipenv install pythonjsonlogger
Installing pythonjsonlogger…
Error:  An error occurred while installing pythonjsonlogger!
Error text: Collecting pythonjsonlogger
  Using cached pythonjsonlogger-0.1.1.tar.gz (1.3 kB)
Building wheels for collected packages: pythonjsonlogger
  Building wheel for pythonjsonlogger (setup.py): started
  Building wheel for pythonjsonlogger (setup.py): finished with status 'error'
  Running setup.py clean for pythonjsonlogger
Failed to build pythonjsonlogger
Installing collected packages: pythonjsonlogger
    Running setup.py install for pythonjsonlogger: started
    Running setup.py install for pythonjsonlogger: finished with status 'error'

  ERROR: Command errored out with exit status 1:
   command: /Users/guillaume/.local/share/virtualenvs/my-app--UATg00V/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/gc/p51q0k_d0m72y9pz5ss3kkx00000gn/T/pip-install-6o24eqbd/pythonjsonlogger/setup.py'"'"'; __file__='"'"'/private/var/folders/gc/p51q0k_d0m72y9pz5ss3kkx00000gn/T/pip-install-6o24eqbd/pythonjsonlogger/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 /private/var/folders/gc/p51q0k_d0m72y9pz5ss3kkx00000gn/T/pip-wheel-z0mnneyx
       cwd: /private/var/folders/gc/p51q0k_d0m72y9pz5ss3kkx00000gn/T/pip-install-6o24eqbd/pythonjsonlogger/
  Complete output (31 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib
  creating build/lib/pythonjsonlogger
  copying pythonjsonlogger/__init__.py -> build/lib/pythonjsonlogger
  copying pythonjsonlogger/cli.py -> build/lib/pythonjsonlogger
  warning: build_py: byte-compiling is disabled, skipping.

  installing to build/bdist.macosx-10.15-x86_64/wheel
  running install
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/gc/p51q0k_d0m72y9pz5ss3kkx00000gn/T/pip-install-6o24eqbd/pythonjsonlogger/setup.py", line 47, in <module>
      'pythonjsonlogger = pythonjsonlogger.cli:cli',
    File "/Users/guillaume/.local/share/virtualenvs/my-app--UATg00V/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/Users/guillaume/.local/share/virtualenvs/my-app--UATg00V/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
      self.run_command(cmd)
    File "/Users/guillaume/.local/share/virtualenvs/my-app--UATg00V/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
      cmd_obj.run()
    File "/Users/guillaume/.local/share/virtualenvs/my-app--UATg00V/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 326, in run
      self.run_command('install')
    File "/Users/guillaume/.local/share/virtualenvs/my-app--UATg00V/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/Users/guillaume/.local/share/virtualenvs/my-app--UATg00V/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
      cmd_obj.run()
    File "/private/var/folders/gc/p51q0k_d0m72y9pz5ss3kkx00000gn/T/pip-install-6o24eqbd/pythonjsonlogger/setup.py", line 20, in run
      raise Exception("You probably meant to install and run python-json-logger")
  Exception: You probably meant to install and run python-json-logger
  ----------------------------------------
  ERROR: Failed building wheel for pythonjsonlogger
DEPRECATION: Could not build wheels for pythonjsonlogger which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
    ERROR: Command errored out with exit status 1:
     command: /Users/guillaume/.local/share/virtualenvs/my-app--UATg00V/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/gc/p51q0k_d0m72y9pz5ss3kkx00000gn/T/pip-install-6o24eqbd/pythonjsonlogger/setup.py'"'"'; __file__='"'"'/private/var/folders/gc/p51q0k_d0m72y9pz5ss3kkx00000gn/T/pip-install-6o24eqbd/pythonjsonlogger/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/gc/p51q0k_d0m72y9pz5ss3kkx00000gn/T/pip-record-cknflbcf/install-record.txt --single-version-externally-managed --compile --install-headers /Users/guillaume/.local/share/virtualenvs/my-app--UATg00V/include/site/python3.7/pythonjsonlogger
         cwd: /private/var/folders/gc/p51q0k_d0m72y9pz5ss3kkx00000gn/T/pip-install-6o24eqbd/pythonjsonlogger/
    Complete output (14 lines):
    running install
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/gc/p51q0k_d0m72y9pz5ss3kkx00000gn/T/pip-install-6o24eqbd/pythonjsonlogger/setup.py", line 47, in <module>
        'pythonjsonlogger = pythonjsonlogger.cli:cli',
      File "/Users/guillaume/.local/share/virtualenvs/my-app--UATg00V/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/Users/guillaume/.local/share/virtualenvs/my-app--UATg00V/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
        self.run_command(cmd)
      File "/Users/guillaume/.local/share/virtualenvs/my-app--UATg00V/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
        cmd_obj.run()
      File "/private/var/folders/gc/p51q0k_d0m72y9pz5ss3kkx00000gn/T/pip-install-6o24eqbd/pythonjsonlogger/setup.py", line 20, in run
        raise Exception("You probably meant to install and run python-json-logger")
    Exception: You probably meant to install and run python-json-logger
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/guillaume/.local/share/virtualenvs/my-app--UATg00V/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/gc/p51q0k_d0m72y9pz5ss3kkx00000gn/T/pip-install-6o24eqbd/pythonjsonlogger/setup.py'"'"'; __file__='"'"'/private/var/folders/gc/p51q0k_d0m72y9pz5ss3kkx00000gn/T/pip-install-6o24eqbd/pythonjsonlogger/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/gc/p51q0k_d0m72y9pz5ss3kkx00000gn/T/pip-record-cknflbcf/install-record.txt --single-version-externally-managed --compile --install-headers /Users/guillaume/.local/share/virtualenvs/my-app--UATg00V/include/site/python3.7/pythonjsonlogger Check the logs for full command output.

✘ Installation Failed 
schlitzered commented 3 years ago

the package name is "python-json-logger" not "pythonjsonlogger".

the error message you are getting is indicating the same:

Exception: You probably meant to install and run python-json-logger
g-ongenae commented 3 years ago

Oh! That's embarrassing.

Thank you for your help.