uuid==1.30 in requirements.txt causes syntax errors
pcoccoli opened this issue · 0 comments
pcoccoli commented
Describe the bug
My project's build is failing due to a syntax error in Python's uuid.py
. After doing some searching, I see others projects have hit this error; it's caused by an old (Python 2) version of the uuid package getting installed. Since Python 3, uuid
is built-in and therefore you should not put uuid
in your requirements.
To Reproduce
Not entirely sure
Expected behavior
No syntax errors!
Screenshots
#8 1.557 Traceback (most recent call last):
#8 1.557 File "/usr/lib64/python3.9/runpy.py", line 197, in _run_module_as_main
#8 1.557 return _run_code(code, main_globals, None,
#8 1.557 File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code
#8 1.557 exec(code, run_globals)
#8 1.557 File "/usr/lib/python3.9/site-packages/pip/__main__.py", line 31, in <module>
#8 1.557 sys.exit(_main())
#8 1.557 File "/usr/lib/python3.9/site-packages/pip/_internal/cli/main.py", line 68, in main
#8 1.557 command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
#8 1.557 File "/usr/lib/python3.9/site-packages/pip/_internal/commands/__init__.py", line 94, in create_command
#8 1.557 module = importlib.import_module(module_path)
#8 1.557 File "/usr/lib64/python3.9/importlib/__init__.py", line 127, in import_module
#8 1.557 return _bootstrap._gcd_import(name[level:], package, level)
#8 1.557 File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
#8 1.557 File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
#8 1.557 File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
#8 1.557 File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
#8 1.557 File "<frozen importlib._bootstrap_external>", line 850, in exec_module
#8 1.557 File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
#8 1.557 File "/usr/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 14, in <module>
#8 1.557 from pip._internal.cli.req_command import (
#8 1.557 File "/usr/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 21, in <module>
#8 1.557 from pip._internal.index.package_finder import PackageFinder
#8 1.557 File "/usr/lib/python3.9/site-packages/pip/_internal/index/package_finder.py", line 32, in <module>
#8 1.558 from pip._internal.req import InstallRequirement
#8 1.558 File "/usr/lib/python3.9/site-packages/pip/_internal/req/__init__.py", line 8, in <module>
#8 1.558 from .req_install import InstallRequirement
#8 1.558 File "/usr/lib/python3.9/site-packages/pip/_internal/req/req_install.py", line 8, in <module>
#8 1.558 import uuid
#8 1.558 File "/opt/modules/lib/python3.9/site-packages/uuid.py", line 138
#8 1.558 if not 0 <= time_low < 1<<32L:
#8 1.558 ^
#8 1.558 SyntaxError: invalid syntax
#8 ERROR: process "/bin/sh -c python3 -m pip install --prefix /opt/modules -r ./tmp/requirements_dev.txt" did not complete successfully: exit code: 1