728x90 반응형 Python2 [Python] TypeError: unsupported operand type(s) for |: 'type' and 'type' Error Message TypeError: unsupported operand type(s) for |: 'type' and 'type' Error Cause 'type' and 'type' syntax is only supported in 3.10 or later. Use Example ## Error Code def debug(msg: str | list): print(msg) ## Right Code def debug(msg: [str, list]): print(msg) debug("text") 2024. 6. 19. Python Error: externally-managed-environment Error Logerror: externally-managed-environment× This environment is externally managed╰─> To install Python packages system-wide, try brew install xyz, where xyz is the package you are trying to install. If you wish to install a Python library that isn't in Homebrew, use a virtual environment: python3 -m venv path/to/venv source path/to/venv/bin/activate python3 -m p.. 2024. 5. 28. 이전 1 다음 728x90 반응형