4719c2f1d3bad4bd7bad5ef3856b363b27e267a5
Linux/Install/Home.md
... | ... | @@ -65,4 +65,21 @@ $ uname -a |
65 | 65 | # poweroff |
66 | 66 | # shutdown -h now |
67 | 67 | ``` |
68 | -- shutdown コマンドの -h オプションを付けないと、シングルユーザモードになるだけで電源は切れない。 |
|
69 | 68 | \ No newline at end of file |
69 | +- shutdown コマンドの -h オプションを付けないと、シングルユーザモードになるだけで電源は切れない。 |
|
70 | + |
|
71 | +# pip3 エラー対応 (AttributeError: '_NamespacePath' object has no attribute 'sort') |
|
72 | +- python3-pip, python3-setuptools を再インストールする。 |
|
73 | +``` |
|
74 | +# dnf erase python3-pip python3-setuptools |
|
75 | +# dnf install -y python3-pip python3-setuptools |
|
76 | +``` |
|
77 | +- 再インストールで直らない場合は、該当ファイルを修正する。<br> |
|
78 | +/usr/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py |
|
79 | +```python |
|
80 | +#orig_path.sort(key=position_in_sys_path) |
|
81 | +#module.__path__[:] = [_normalize_cached(p) for p in orig_path] |
|
82 | +orig_path_t = list(orig_path) |
|
83 | +orig_path_t.sort(key=position_in_sys_path) |
|
84 | +module.__path__[:] = [_normalize_cached(p) for p in orig_path_t] |
|
85 | +``` |
|
86 | +- [python - pip3 error - '_NamespacePath' object has no attribute 'sort' - Stack Overflow](https://stackoverflow.com/questions/47955397/) |