aboutcode-org / aboutcode-org/scancode-toolkit

Recommended install method fails: No module named 'distutils.cmd'

Đang mở
#2,942 8 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Python
Star
2.6k
Fork
791
Merge trung bình
1 ngày 12 giờ
Pull request đã merge (30 ngày)
5

Mô tả

### Description

Following the README's instructions to install using the recommended method fails with the following output.

```
* Configuring ScanCode for first use...
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home//.local/share/virtualenv/wheel/house/pip-21.2.3-py3-none-any.whl/pip/__main__.py", line 29, in
File "", line 259, in load_module
File "/home//.local/share/virtualenv/wheel/house/pip-21.2.3-py3-none-any.whl/pip/_internal/cli/main.py", line 9, in
File "", line 259, in load_module
File "/home//.local/share/virtualenv/wheel/house/pip-21.2.3-py3-none-any.whl/pip/_internal/cli/autocompletion.py", line 10, in
File "", line 259, in load_module
File "/home//.local/share/virtualenv/wheel/house/pip-21.2.3-py3-none-any.whl/pip/_internal/cli/main_parser.py", line 8, in
File "", line 259, in load_module
File "/home//.local/share/virtualenv/wheel/house/pip-21.2.3-py3-none-any.whl/pip/_internal/cli/cmdoptions.py", line 23, in
File "", line 259, in load_module
File "/home//.local/share/virtualenv/wheel/house/pip-21.2.3-py3-none-any.whl/pip/_internal/cli/parser.py", line 12, in
File "", line 259, in load_module
File "/home//.local/share/virtualenv/wheel/house/pip-21.2.3-py3-none-any.whl/pip/_internal/configuration.py", line 27, in
File "", line 259, in load_module
File "/home//.local/share/virtualenv/wheel/house/pip-21.2.3-py3-none-any.whl/pip/_internal/utils/misc.py", line 42, in
File "", line 259, in load_module
File "/home//.local/share/virtualenv/wheel/house/pip-21.2.3-py3-none-any.whl/pip/_internal/locations/__init__.py", line 14, in
File "", line 259, in load_module
File "/home//.local/share/virtualenv/wheel/house/pip-21.2.3-py3-none-any.whl/pip/_internal/locations/_distutils.py", line 9, in
ModuleNotFoundError: No module named 'distutils.cmd'
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home//Downloads/scancode-toolkit-30.1.0/etc/thirdparty/virtualenv.pyz/__main__.py", line 168, in
File "/home//Downloads/scancode-toolkit-30.1.0/etc/thirdparty/virtualenv.pyz/__main__.py", line 164, in run
File "/home//Downloads/scancode-toolkit-30.1.0/etc/thirdparty/virtualenv.pyz/virtualenv/__main__.py", line 18, in run
File "/home//Downloads/scancode-toolkit-30.1.0/etc/thirdparty/virtualenv.pyz/virtualenv/run/__init__.py", line 32, in cli_run
File "/home//Downloads/scancode-toolkit-30.1.0/etc/thirdparty/virtualenv.pyz/virtualenv/run/session.py", line 47, in run
File "/home//Downloads/scancode-toolkit-30.1.0/etc/thirdparty/virtualenv.pyz/virtualenv/run/session.py", line 60, in _seed
File "/home//Downloads/scancode-toolkit-30.1.0/etc/thirdparty/virtualenv.pyz/virtualenv/seed/embed/pip_invoke.py", line 23, in run
File "/home//Downloads/scancode-toolkit-30.1.0/etc/thirdparty/virtualenv.pyz/virtualenv/seed/embed/pip_invoke.py", line 31, in _execute
RuntimeError: failed seed with code 1
```

Further runs show this error:
```
./scancode: line 122: /home//Downloads/scancode-toolkit-30.1.0/bin/scancode: No such file or directory
```

### How To Reproduce

> Tell us how to reproduce the issue.

```bash
wget https://github.com/nexB/scancode-toolkit/releases/download/v30.1.0/scancode-toolkit-30.1.0_py39-linux.tar.xz
tar xf scancode-toolkit-30.1.0_py39-linux.tar.xz
cd scancode-toolkit-30.1.0/
./scancode --help
```
or with beta release
```bash
wget https://github.com/nexB/scancode-toolkit/releases/download/v31.0.0b3/scancode-toolkit-31.0.0b3_py39-linux.tar.xz
tar xf scancode-toolkit-31.0.0b3_py39-linux.tar.xz
cd scancode-toolkit-31.0.0b3/
./scancode --help
```

### System configuration

* Ubuntu 21.10
* Python 3.9.7
* scancode v30.1.0 - 2021-09-25 or v31.0.0b3 - 2022-04-30
* Downloaded from releases

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.