tern-tools / tern

Tern is a software composition analysis tool and Python library that generates a Software Bill of Materials for container images and Dockerfiles. The SBOM that Tern generates will give you a layer-by-layer view of what's inside your container in a variety of formats including human-readable, JSON, HTML, SPDX and more.
BSD 2-Clause "Simplified" License
967 stars 188 forks source link

Old release of Tern when installed with ScanCode #1195

Closed vargenau closed 1 year ago

vargenau commented 1 year ago

Describe the bug When installing Tern alone, I get latest version 2.10.1

When installing together with ScanCode, I get an older version, 2.10.0

To Reproduce

Install Tern alone

pip install tern
tern --version
Tern version 2.10.1

Install Tern with ScanCode

pip install tern scancode-toolkit
tern --version
Tern version 2.10.0

Expected behavior Latest version of Tern should be installed in all cases.

Environment you are running Tern on Enter all that apply

vargenau commented 1 year ago

See also #1185

rnjudge commented 1 year ago

Hi @vargenau - I don't suspect that Tern is causing this issue. I would expect pip to resolve what package version gets installed and if it's not doing that, then the issue is with pip or perhaps a conflict within your environment. Tern doesn't have any relationshp to scancode that would change what version gets installed from pip when scancode is also being installed. Do you see this issue with other packages (i.e. if you run pip install tern <random_package>?) You can also try using the --no-cache-dir option when you pip install to make sure pip is not pulling old versions of Tern from your local cache.

When I create a fresh python virtual environment and run the command you pasted, pip tries to install the correct version of Tern, but it does pull it from my cache. If I use the --no-cache-dir option, pip still pulls the latest version correctly. Perhaps your system is pulling an old cached version of Tern?

rose@rose-vm:~$ python3 -m venv testenv
rose@rose-vm:~$ cd testenv/
rose@rose-vm:~/testenv$ source bin/activate
(testenv) rose@rose-vm:~/testenv$ pip install tern scancode-toolkit
Collecting tern
  Using cached tern-2.10.1-py3-none-any.whl (154 kB)
Collecting scancode-toolkit
  Using cached scancode_toolkit-31.2.1-py3-none-any.whl (103.7 MB)

rose@rose-vm:~$ python3 -m venv testenv2
rose@rose-vm:~$ cd testenv2/
rose@rose-vm:~/testenv2$ source bin/activate
(testenv2) rose@rose-vm:~/testenv2$ pip install tern scancode-toolkit --no-cache-dir
Collecting tern
  Downloading tern-2.10.1-py3-none-any.whl (154 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 154.7/154.7 kB 3.8 MB/s eta 0:00:00
Collecting scancode-toolkit
  Downloading scancode_toolkit-31.2.1-py3-none-any.whl (103.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 103.7/103.7 MB 38.8 MB/s eta 0:00:00
rnjudge commented 1 year ago

Going to close this bug since it's not Tern related. If you find evidence otherwise, @vargenau, please re-open.

vargenau commented 1 year ago

Hi @rnjudge

I still have the issue.

Here is a detailed log.

Removing cache

vargenau@ubuntix 213 > rm -r ~/.cache/pip

Installing Tern alone

vargenau@ubuntix 218 > python3 -m venv ternenv
vargenau@ubuntix 219 > cd ternenv

vargenau@ubuntix 220 > source bin/activate.csh
(ternenv) vargenau@ubuntix 221 > pip install tern
Collecting tern
  Downloading tern-2.10.1-py3-none-any.whl (154 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 154.7/154.7 kB 839.7 kB/s eta 0:00:00
Collecting dockerfile-parse==1.2.0
  Downloading dockerfile_parse-1.2.0-py2.py3-none-any.whl (14 kB)
Collecting websocket-client==1.3.2
  Downloading websocket_client-1.3.2-py3-none-any.whl (54 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.3/54.3 kB 7.9 MB/s eta 0:00:00
Collecting regex==2022.6.2
  Downloading regex-2022.6.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (763 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 764.0/764.0 kB 2.0 MB/s eta 0:00:00
Collecting urllib3==1.26.9
  Downloading urllib3-1.26.9-py2.py3-none-any.whl (138 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 139.0/139.0 kB 1.5 MB/s eta 0:00:00
Collecting boolean-py==4.0
  Downloading boolean.py-4.0-py3-none-any.whl (25 kB)
Collecting certifi==2022.5.18.1
  Downloading certifi-2022.5.18.1-py3-none-any.whl (155 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 155.2/155.2 kB 1.0 MB/s eta 0:00:00
Collecting prettytable==3.3.0
  Downloading prettytable-3.3.0-py3-none-any.whl (26 kB)
Collecting gitdb==4.0.9
  Downloading gitdb-4.0.9-py3-none-any.whl (63 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.1/63.1 kB 554.3 kB/s eta 0:00:00
Collecting stevedore==3.5.0
  Downloading stevedore-3.5.0-py3-none-any.whl (49 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.7/49.7 kB 3.2 MB/s eta 0:00:00
Collecting attrs==21.4.0
  Downloading attrs-21.4.0-py2.py3-none-any.whl (60 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.6/60.6 kB 1.0 MB/s eta 0:00:00
Collecting idna==3.3
  Downloading idna-3.3-py3-none-any.whl (61 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.2/61.2 kB 643.5 kB/s eta 0:00:00
Collecting charset-normalizer==2.0.12
  Downloading charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting packageurl-python==0.9.9
  Downloading packageurl_python-0.9.9-py3-none-any.whl (24 kB)
Collecting smmap==5.0.0
  Downloading smmap-5.0.0-py3-none-any.whl (24 kB)
Collecting debian-inspector==30.0.0
  Downloading debian_inspector-30.0.0-py3-none-any.whl (43 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 43.3/43.3 kB 700.8 kB/s eta 0:00:00
Collecting pyyaml==6.0
  Downloading PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (682 kB)

     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 682.2/682.2 kB 2.8 MB/s eta 0:00:00
Collecting chardet==4.0.0
  Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 178.7/178.7 kB 1.4 MB/s eta 0:00:00
Collecting wcwidth==0.2.5
  Downloading wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Collecting requests==2.28.0
  Downloading requests-2.28.0-py3-none-any.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.8/62.8 kB 853.5 kB/s eta 0:00:00
Collecting license-expression==30.0.0
  Downloading license_expression-30.0.0-py3-none-any.whl (86 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 86.4/86.4 kB 2.3 MB/s eta 0:00:00
Collecting docker==5.0.3
  Downloading docker-5.0.3-py2.py3-none-any.whl (146 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 146.2/146.2 kB 1.8 MB/s eta 0:00:00
Collecting pbr==5.9.0
  Downloading pbr-5.9.0-py2.py3-none-any.whl (112 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 112.3/112.3 kB 2.1 MB/s eta 0:00:00
Collecting six==1.16.0
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting gitpython==3.1.27
  Downloading GitPython-3.1.27-py3-none-any.whl (181 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 181.2/181.2 kB 2.9 MB/s eta 0:00:00
Installing collected packages: wcwidth, boolean-py, websocket-client, urllib3, smmap, six, regex, pyyaml, prettytable, pbr, packageurl-python, license-expression, idna, charset-normalizer, chardet, certifi, attrs, stevedore, requests, gitdb, dockerfile-parse, debian-inspector, gitpython, docker, tern
Successfully installed attrs-21.4.0 boolean-py-4.0 certifi-2022.5.18.1 chardet-4.0.0 charset-normalizer-2.0.12 debian-inspector-30.0.0 docker-5.0.3 dockerfile-parse-1.2.0 gitdb-4.0.9 gitpython-3.1.27 idna-3.3 license-expression-30.0.0 packageurl-python-0.9.9 pbr-5.9.0 prettytable-3.3.0 pyyaml-6.0 regex-2022.6.2 requests-2.28.0 six-1.16.0 smmap-5.0.0 stevedore-3.5.0 tern-2.10.1 urllib3-1.26.9 wcwidth-0.2.5 websocket-client-1.3.2
(ternenv) vargenau@ubuntix 222 > rehash
(ternenv) vargenau@ubuntix 223 > tern --version
Tern version 2.10.1
   python version = 3.10.7 (main, Nov 24 2022, 19:45:47) 

Installing Tern with ScanCode

vargenau@ubuntix 202 > cd

vargenau@ubuntix 203 > python3 -m venv ternscancodeenv

vargenau@ubuntix 204 > cd ternscancodeenv

vargenau@ubuntix 205 > source bin/activate.csh

(ternscancodeenv) vargenau@ubuntix 206 > pip install tern scancode-toolkit

Collecting tern
  Using cached tern-2.10.1-py3-none-any.whl (154 kB)
Collecting scancode-toolkit
  Downloading scancode_toolkit-31.2.1-py3-none-any.whl (103.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 103.7/103.7 MB 323.9 kB/s eta 0:00:00
Collecting chardet==4.0.0
  Using cached chardet-4.0.0-py2.py3-none-any.whl (178 kB)
Collecting charset-normalizer==2.0.12
  Using cached charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting license-expression==30.0.0
  Using cached license_expression-30.0.0-py3-none-any.whl (86 kB)
Collecting certifi==2022.5.18.1
  Using cached certifi-2022.5.18.1-py3-none-any.whl (155 kB)
Collecting urllib3==1.26.9
  Using cached urllib3-1.26.9-py2.py3-none-any.whl (138 kB)
Collecting dockerfile-parse==1.2.0
  Using cached dockerfile_parse-1.2.0-py2.py3-none-any.whl (14 kB)
Collecting docker==5.0.3
  Using cached docker-5.0.3-py2.py3-none-any.whl (146 kB)
Collecting requests==2.28.0
  Using cached requests-2.28.0-py3-none-any.whl (62 kB)
Collecting smmap==5.0.0
  Using cached smmap-5.0.0-py3-none-any.whl (24 kB)
Collecting pbr==5.9.0
  Using cached pbr-5.9.0-py2.py3-none-any.whl (112 kB)
Collecting debian-inspector==30.0.0
  Using cached debian_inspector-30.0.0-py3-none-any.whl (43 kB)
Collecting idna==3.3
  Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting stevedore==3.5.0
  Using cached stevedore-3.5.0-py3-none-any.whl (49 kB)
Collecting regex==2022.6.2
  Using cached regex-2022.6.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (763 kB)
Collecting boolean-py==4.0
  Using cached boolean.py-4.0-py3-none-any.whl (25 kB)
Collecting packageurl-python==0.9.9
  Using cached packageurl_python-0.9.9-py3-none-any.whl (24 kB)
Collecting gitpython==3.1.27
  Using cached GitPython-3.1.27-py3-none-any.whl (181 kB)
Collecting websocket-client==1.3.2
  Using cached websocket_client-1.3.2-py3-none-any.whl (54 kB)
Collecting prettytable==3.3.0
  Using cached prettytable-3.3.0-py3-none-any.whl (26 kB)
Collecting six==1.16.0
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting attrs==21.4.0
  Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB)
Collecting pyyaml==6.0
  Using cached PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (682 kB)
Collecting wcwidth==0.2.5
  Using cached wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Collecting gitdb==4.0.9
  Using cached gitdb-4.0.9-py3-none-any.whl (63 kB)
Collecting javaproperties>=0.5
  Downloading javaproperties-0.8.1-py3-none-any.whl (23 kB)
Collecting pip-requirements-parser>=31.2.0
  Downloading pip_requirements_parser-32.0.0-py3-none-any.whl (33 kB)
Collecting ftfy>=6.0.0
  Downloading ftfy-6.1.1-py3-none-any.whl (53 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.1/53.1 kB 3.1 MB/s eta 0:00:00
Collecting plugincode>=31.0.0
  Downloading plugincode-31.0.0-py3-none-any.whl (18 kB)
Collecting xmltodict>=0.11.0
  Downloading xmltodict-0.13.0-py2.py3-none-any.whl (10.0 kB)
Collecting scancode-toolkit
  Downloading scancode_toolkit-31.1.1-py3-none-any.whl (102.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 102.9/102.9 MB 473.3 kB/s eta 0:00:00
  Downloading scancode_toolkit-31.1.0-py3-none-any.whl (102.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 102.9/102.9 MB 595.7 kB/s eta 0:00:00
  Downloading scancode_toolkit-31.0.2-py3-none-any.whl (93.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 93.2/93.2 MB 642.1 kB/s eta 0:00:00
  Downloading scancode_toolkit-31.0.1-py3-none-any.whl (92.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 92.3/92.3 MB 1.5 MB/s eta 0:00:00
Collecting plugincode==31.0.0b1
  Downloading plugincode-31.0.0b1-py3-none-any.whl (18 kB)
Collecting jsonstreams>=0.5.0
  Downloading jsonstreams-0.6.0-py2.py3-none-any.whl (10 kB)
Collecting gemfileparser>=0.7.0
  Downloading gemfileparser-0.8.0-py2.py3-none-any.whl (19 kB)
Collecting pkginfo2>=30.0.0
  Downloading pkginfo2-30.0.0-py3-none-any.whl (25 kB)
Collecting pygments
  Downloading Pygments-2.13.0-py3-none-any.whl (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 1.1 MB/s eta 0:00:00
Collecting container-inspector>=31.0.0
  Downloading container_inspector-32.0.1-py3-none-any.whl (40 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.4/40.4 kB 300.6 kB/s eta 0:00:00
Collecting typecode>=30.0.0
  Downloading typecode-30.0.0-py3-none-any.whl (1.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 1.9 MB/s eta 0:00:00
Collecting importlib-metadata
  Downloading importlib_metadata-5.1.0-py3-none-any.whl (21 kB)
Collecting jaraco.functools
  Downloading jaraco.functools-3.5.2-py3-none-any.whl (7.3 kB)
Collecting pdfminer.six>=20200101
  Downloading pdfminer.six-20221105-py3-none-any.whl (5.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.6/5.6 MB 1.5 MB/s eta 0:00:00
Collecting spdx-tools>=0.7.0a3
  Downloading spdx_tools-0.7.0a3-py3-none-any.whl (227 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 227.1/227.1 kB 929.8 kB/s eta 0:00:00
Collecting text-unidecode>=1.0
  Downloading text_unidecode-1.3-py2.py3-none-any.whl (78 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.2/78.2 kB 894.9 kB/s eta 0:00:00
Collecting publicsuffix2
  Downloading publicsuffix2-2.20191221-py2.py3-none-any.whl (89 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.0/89.0 kB 859.6 kB/s eta 0:00:00
Collecting pygmars>=0.7.0
  Downloading pygmars-0.8.0-py3-none-any.whl (28 kB)
Collecting commoncode==31.0.0b4
  Downloading commoncode-31.0.0b4-py3-none-any.whl (88 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 88.5/88.5 kB 682.9 kB/s eta 0:00:00
Collecting fasteners
  Downloading fasteners-0.18-py3-none-any.whl (18 kB)
Collecting MarkupSafe>=1.0
  Downloading MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting pluggy>=1.0.0
  Downloading pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting dparse2>=0.6.1
  Downloading dparse2-0.6.1-py3-none-any.whl (10 kB)
Collecting saneyaml>=0.5.2
  Downloading saneyaml-0.5.2-py3-none-any.whl (11 kB)
Collecting jinja2>=2.7.0
  Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 kB 2.9 MB/s eta 0:00:00
Collecting fingerprints>=0.6.0
  Downloading fingerprints-1.0.3-py2.py3-none-any.whl (13 kB)
Collecting click!=7.0,>=6.7
  Downloading click-8.1.3-py3-none-any.whl (96 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.6/96.6 kB 1.7 MB/s eta 0:00:00
Collecting urlpy
  Downloading urlpy-0.5-py2.py3-none-any.whl (9.1 kB)
Collecting packaging>=21.0.0
  Downloading packaging-22.0-py3-none-any.whl (42 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.6/42.6 kB 1.5 MB/s eta 0:00:00
Collecting scancode-toolkit
  Downloading scancode_toolkit-30.1.0-py3-none-any.whl (67.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 67.2/67.2 MB 1.0 MB/s eta 0:00:00
Collecting dparse>=0.5.1
  Downloading dparse-0.6.2-py3-none-any.whl (12 kB)
Collecting pluggy<1.0,>=0.12.0
  Downloading pluggy-0.13.1-py2.py3-none-any.whl (18 kB)
Collecting lxml<5.0.0,>=4.6.3
  Downloading lxml-4.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (7.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.1/7.1 MB 2.3 MB/s eta 0:00:00
Collecting extractcode[full]>=21.7.23
  Downloading extractcode-31.0.0-py3-none-any.whl (56 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.7/56.7 kB 795.5 kB/s eta 0:00:00
Collecting bitarray<3.0.0,>=0.8.1
  Downloading bitarray-2.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (242 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 242.4/242.4 kB 1.3 MB/s eta 0:00:00
Collecting intbitset<3.0,>=2.3.0
  Downloading intbitset-2.4.1.tar.gz (152 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 152.9/152.9 kB 1.8 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting pymaven-patch>=0.2.8
  Downloading pymaven_patch-0.3.0-py2.py3-none-any.whl (23 kB)
Collecting toml>=0.10.0
  Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting html5lib
  Downloading html5lib-1.1-py2.py3-none-any.whl (112 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 112.2/112.2 kB 2.0 MB/s eta 0:00:00
Collecting pkginfo>=1.7.0
  Downloading pkginfo-1.9.2-py3-none-any.whl (26 kB)
Collecting commoncode>=30.0.0
  Downloading commoncode-31.0.0-py3-none-any.whl (88 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 88.7/88.7 kB 1.2 MB/s eta 0:00:00
Collecting pefile>=2020.1.1
  Downloading pefile-2022.5.30.tar.gz (72 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 72.9/72.9 kB 462.1 kB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting Beautifulsoup4<5.0.0,>=4.0.0
  Downloading beautifulsoup4-4.11.1-py3-none-any.whl (128 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 128.2/128.2 kB 1.2 MB/s eta 0:00:00
Collecting pyahocorasick<1.5,>=1.4.0
  Downloading pyahocorasick-1.4.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (109 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 109.8/109.8 kB 1.2 MB/s eta 0:00:00
Collecting parameter-expansion-patched>=0.2.1b4
  Downloading parameter_expansion_patched-0.3.1-py3-none-any.whl (11 kB)
Collecting scancode-toolkit
  Downloading scancode_toolkit-30.0.1-py3-none-any.whl (67.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 67.2/67.2 MB 740.8 kB/s eta 0:00:00
  Downloading scancode_toolkit-30.0.0-py3-none-any.whl (67.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 67.2/67.2 MB 636.4 kB/s eta 0:00:00
  Downloading scancode_toolkit-21.8.4-py3-none-any.whl (61.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.4/61.4 MB 1.1 MB/s eta 0:00:00
Collecting spdx-tools>=0.6.0
  Downloading spdx_tools-0.6.1-py2.py3-none-any.whl (206 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 206.8/206.8 kB 1.8 MB/s eta 0:00:00
Collecting scancode-toolkit
  Downloading scancode_toolkit-21.7.30-py3-none-any.whl (61.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.4/61.4 MB 1.7 MB/s eta 0:00:00
  Downloading scancode_toolkit-21.6.7-py3-none-any.whl (61.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.2/61.2 MB 965.2 kB/s eta 0:00:00
Collecting nltk!=3.6,<4.0,>=3.2
  Downloading nltk-3.8-py3-none-any.whl (1.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 2.0 MB/s eta 0:00:00
Collecting scancode-toolkit
  Downloading scancode_toolkit-21.3.31-py3-none-any.whl (55.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.7/55.7 MB 927.6 kB/s eta 0:00:00
Collecting jinja2<3.0.0,>=2.7.0
  Downloading Jinja2-2.11.3-py2.py3-none-any.whl (125 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 125.7/125.7 kB 768.7 kB/s eta 0:00:00
Collecting pycryptodome>=3.4
  Downloading pycryptodome-3.16.0-cp35-abi3manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.3/2.3 MB 1.2 MB/s eta 0:00:00
Collecting bitarray<1.0.0,>=0.8.1
  Downloading bitarray-0.9.3.tar.gz (38 kB)
  Preparing metadata (setup.py) ... done
Collecting ftfy<5.0.0
  Downloading ftfy-4.4.3.tar.gz (50 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 50.5/50.5 kB 2.9 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting scancode-toolkit
  Downloading scancode_toolkit-21.2.25-py3-none-any.whl (52.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 52.4/52.4 MB 1.8 MB/s eta 0:00:00
Collecting debut>=0.9.9
  Downloading debut-0.9.9-py2.py3-none-any.whl (40 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.0/41.0 kB 497.4 kB/s eta 0:00:00
Collecting scancode-toolkit
  Downloading scancode_toolkit-21.2.9-py3-none-any.whl (50.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 50.1/50.1 MB 1.4 MB/s eta 0:00:00
  Downloading scancode_toolkit-3.2.3-py2.py3-none-any.whl (20.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 20.5/20.5 MB 893.4 kB/s eta 0:00:00
Collecting contextlib2
  Downloading contextlib2-21.6.0-py2.py3-none-any.whl (13 kB)
Collecting future>=0.16.0
  Downloading future-0.18.2.tar.gz (829 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 829.2/829.2 kB 2.1 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting scancode-toolkit
  Downloading scancode_toolkit-3.2.0-py2.py3-none-any.whl (20.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 20.7/20.7 MB 3.0 MB/s eta 0:00:00
Collecting extractcode-7z
  Downloading extractcode_7z-16.5.210531-py3-none-manylinux1_x86_64.whl (1.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 2.8 MB/s eta 0:00:00
Collecting scancode-toolkit
  Downloading scancode_toolkit-3.1.1-py2.py3-none-any.whl (16.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.9/16.9 MB 1.7 MB/s eta 0:00:00
INFO: pip is looking at multiple versions of websocket-client to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of wcwidth to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of urllib3 to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of stevedore to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of smmap to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of six to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of requests to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of regex to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of pyyaml to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of prettytable to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of pbr to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of packageurl-python to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of license-expression to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of idna to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of gitpython to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of gitdb to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of dockerfile-parse to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of docker to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of debian-inspector to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of charset-normalizer to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of chardet to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of certifi to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of boolean-py to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
INFO: pip islooking at multiple versions of attrs to determine which version is compatible with other requirements. This could take a while.
INFO: pip islooking at multiple versions of tern to determine which version is compatible with other requirements. This could take a while.
Collecting tern
  Downloading tern-2.10.0-py3-none-any.whl (153 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 154.0/154.0 kB 679.6 kB/s eta 0:00:00
Collecting regex==2022.3.15
  Downloading regex-2022.3.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (763 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 763.9/763.9 kB 2.7 MB/s eta 0:00:00
Collecting requests==2.27.1
  Downloading requests-2.27.1-py2.py3-none-any.whl (63 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.1/63.1 kB 2.3 MB/s eta 0:00:00
Collecting pbr==5.8.1
  Downloading pbr-5.8.1-py2.py3-none-any.whl (113 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 113.0/113.0 kB 1.5 MB/s eta 0:00:00
Collecting prettytable==3.2.0
  Downloading prettytable-3.2.0-py3-none-any.whl (26 kB)
Collecting certifi==2021.10.8
  Downloading certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 149.2/149.2 kB 756.0 kB/s eta 0:00:00
Collecting boolean.py<4.0,>=3.5
  Downloading boolean.py-3.8-py2.py3-none-any.whl (23 kB)
Collecting colorama>=0.3.9
  Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Collecting license-expression>=21.6.14
  Downloading license_expression-21.6.14-py3-none-any.whl (86 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 86.2/86.2 kB 730.1 kB/s eta 0:00:00
Collecting soupsieve>1.2
  Downloading soupsieve-2.3.2.post1-py3-none-any.whl (37 kB)
Collecting extractcode-libarchive>=3.5.1.210525
  Downloading extractcode_libarchive-3.5.1.210531-py3-none-manylinux1_x86_64.whl (1.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 1.1 MB/s eta 0:00:00
Collecting normality>=2.0.0
  Downloading normality-2.4.0-py2.py3-none-any.whl (10 kB)
Collecting cryptography>=36.0.0
  Downloading cryptography-38.0.4-cp36-abi3-manylinux_2_28_x86_64.whl (4.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.2/4.2 MB 1.4 MB/s eta 0:00:00
Collecting rdflib
  Downloading rdflib-6.2.0-py3-none-any.whl (500 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 500.3/500.3 kB 1.2 MB/s eta 0:00:00
Collecting ply
  Downloading ply-3.11-py2.py3-none-any.whl (49 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.6/49.6 kB 343.8 kB/s eta 0:00:00
Collecting binaryornot
  Downloading binaryornot-0.4.4-py2.py3-none-any.whl (9.0 kB)
Collecting typecode-libmagic>=5.39.210223
  Downloading typecode_libmagic-5.39.210531-py3-none-manylinux1_x86_64.whl (539 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 539.5/539.5 kB 1.1 MB/s eta 0:00:00
Collecting webencodings
  Downloading webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
Collecting more-itertools
  Downloading more_itertools-9.0.0-py3-none-any.whl (52 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 52.8/52.8 kB 2.2 MB/s eta 0:00:00
Collecting cffi>=1.12
  Downloading cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (441 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 441.8/441.8 kB 1.5 MB/s eta 0:00:00
Collecting banal>=1.0.1
  Downloading banal-1.0.6-py2.py3-none-any.whl (6.1 kB)
Requirement already satisfied: setuptools in ./lib/python3.10/site-packages (from rdflib->spdx-tools>=0.7.0a3->scancodetoolkit) (59.6.0)
Collecting pyparsing
  Downloading pyparsing-3.0.9-py3-none-any.whl (98 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.3/98.3 kB 904.6 kB/s eta 0:00:00
Collecting isodate
  Downloading isodate-0.6.1-py2.py3-none-any.whl (41 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.7/41.7 kB 364.6 kB/s eta 0:00:00
Collecting pycparser
  Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 kB 2.0 MB/s eta 0:00:00
Using legacy 'setup.py install' for intbitset, since package 'wheel' is not installed.
Using legacy 'setup.py install' for pefile, since package 'wheel' is not installed.
Using legacy 'setup.py install' for future, since package 'wheel' is not installed.
Installing collected packages: webencodings, wcwidth, typecode-libmagic, text-unidecode, pyahocorasick, publicsuffix2, ply, parameter-expansion-patched, gemfileparser, extractcode-libarchive, extractcode-7z, certifi, boolean.py, bitarray, banal, xmltodict, websocket-client, urlpy, urllib3, toml, soupsieve, smmap, six, regex, pyyaml, pyparsing, pygments, pygmars, pycparser, prettytable, pluggy, pkginfo, pbr, packaging, packageurl-python, more-itertools, MarkupSafe, lxml, license-expression, javaproperties, idna, future, ftfy, fasteners, colorama, click, charset-normalizer, chardet, attrs, stevedore, saneyaml, requests, pefile, normality, jsonstreams, jinja2, jaraco.functools, isodate, intbitset, html5lib, gitdb, dparse, dockerfile-parse, debian-inspector, cffi, binaryornot, Beautifulsoup4, rdflib, pymaven-patch, gitpython, fingerprints, docker, cryptography, commoncode, tern, spdx-tools, plugincode, pdfminer.six, typecode, extractcode, scancode-toolkit
  Running setup.py install for future ... done
  Running setup.py install for pefile ... done
  Running setup.py install for intbitset ... done
Successfully installed Beautifulsoup4-4.11.1 MarkupSafe-2.1.1 attrs-21.4.0 banal-1.0.6 binaryornot-0.4.4 bitarray-2.6.0 boolean.py-3.8 certifi-2021.10.8 cffi-1.15.1 chardet-4.0.0 charset-normalizer-2.0.12 click-8.1.3 colorama-0.4.6 commoncode-31.0.0 cryptography-38.0.4 debian-inspector-30.0.0 docker-5.0.3 dockerfile-parse-1.2.0 dparse-0.6.2 extractcode-31.0.0 extractcode-7z-16.5.210531 extractcode-libarchive-3.5.1.210531 fasteners-0.18 fingerprints-1.0.3 ftfy-6.1.1 future-0.18.2 gemfileparser-0.8.0 gitdb-4.0.9 gitpython-3.1.27 html5lib-1.1 idna-3.3 intbitset-2.4.1 isodate-0.6.1 jaraco.functools-3.5.2 javaproperties-0.8.1 jinja2-3.1.2 jsonstreams-0.6.0 license-expression-21.6.14 lxml-4.9.2 more-itertools-9.0.0 normality-2.4.0 packageurl-python-0.9.9 packaging-22.0 parameter-expansion-patched-0.3.1 pbr-5.8.1 pdfminer.six-20221105 pefile-2022.5.30 pkginfo-1.9.2 pluggy-0.13.1 plugincode-31.0.0 ply-3.11 prettytable-3.2.0 publicsuffix2-2.20191221 pyahocorasick-1.4.4 pycparser-2.21 pygmars-0.8.0 pygments-2.13.0 pymaven-patch-0.3.0 pyparsing-3.0.9 pyyaml-6.0 rdflib-6.2.0 regex-2022.3.15 requests-2.27.1 saneyaml-0.5.2 scancode-toolkit-30.1.0 six-1.16.0 smmap-5.0.0 soupsieve-2.3.2.post1 spdx-tools-0.7.0a3 stevedore-3.5.0 tern-2.10.0 text-unidecode-1.3 toml-0.10.2 typecode-30.0.0 typecode-libmagic-5.39.210531 urllib3-1.26.9 urlpy-0.5 wcwidth-0.2.5 webencodings-0.5.1 websocket-client-1.3.2 xmltodict-0.13.0
(ternscancodeenv) vargenau@ubuntix 207 > rehash
(ternscancodeenv) vargenau@ubuntix 208 > which tern
/home/vargenau/ternscancodeenv/bin/tern
(ternscancodeenv) vargenau@ubuntix 209 > tern --version
Tern version 2.10.0
   python version = 3.10.7 (main, Nov 24 2022, 19:45:47) 
rnjudge commented 1 year ago

@vargenau Since I am not able to recreate this issue it's hard for me to debug it. With the new release, all of the dependencies will be updated which I hope will resolve what looks like an incompatability with Scancode's dependencies.

vargenau commented 1 year ago

Hi @rnjudge

I suppose you should be able to reproduce it by creating a virtual machine with Ubuntu 22.10 like I did.

What is strange in the above log is that pip is trying to install many versions of scancode:

 Collecting scancode-toolkit
  Downloading scancode_toolkit-31.1.1-py3-none-any.whl (102.9 MB)
  Downloading scancode_toolkit-31.1.0-py3-none-any.whl (102.9 MB)
  Downloading scancode_toolkit-31.0.2-py3-none-any.whl (93.2 MB)
  Downloading scancode_toolkit-31.0.1-py3-none-any.whl (92.3 MB)
Collecting scancode-toolkit
  Downloading scancode_toolkit-30.1.0-py3-none-any.whl (67.2 MB)
Collecting scancode-toolkit
  Downloading scancode_toolkit-30.0.1-py3-none-any.whl (67.2 MB)
  Downloading scancode_toolkit-30.0.0-py3-none-any.whl (67.2 MB)
  Downloading scancode_toolkit-21.8.4-py3-none-any.whl (61.4 MB)
Collecting scancode-toolkit
  Downloading scancode_toolkit-21.7.30-py3-none-any.whl (61.4 MB)
  Downloading scancode_toolkit-21.6.7-py3-none-any.whl (61.2 MB)
Collecting scancode-toolkit
  Downloading scancode_toolkit-21.3.31-py3-none-any.whl (55.7 MB)
Collecting scancode-toolkit
  Downloading scancode_toolkit-21.2.25-py3-none-any.whl (52.4 MB)
Collecting scancode-toolkit
  Downloading scancode_toolkit-21.2.9-py3-none-any.whl (50.1 MB)
  Downloading scancode_toolkit-3.2.3-py2.py3-none-any.whl (20.5 MB)
Collecting scancode-toolkit
  Downloading scancode_toolkit-3.2.0-py2.py3-none-any.whl (20.7 MB)
Collecting scancode-toolkit
  Downloading scancode_toolkit-3.1.1-py2.py3-none-any.whl (16.9 MB)

Probably this is why pip get confused:

INFO: pip islooking at multiple versions of tern to determine which version is compatible with other requirements. This could take a while.
Collecting tern
  Downloading tern-2.10.0-py3-none-any.whl (153 kB)

Anyway, let us see if the issue persists with the next release of Tern.

vargenau commented 1 year ago

Even more strange. I tried with:

pip install scancode-toolkit tern

instead of

pip install tern scancode-toolkit

The result is worse:

tern --version
Tern version 2.5.0
   python version = 3.10.7 (main, Nov 24 2022, 19:45:47) 
vargenau commented 1 year ago

Hi @rnjudge,

Good news: the issue no longer occurs with Tern 2.11.0.