最近、spotdl
次のURLの指示に従って(Spotifyダウンローダ)をインストールしました。GitHubインストールページ。しかし、ツールを実行して提供されたコマンドを実行しようとするとプロジェクトページ、Terminal
結果に次のメッセージが表示されます。spotdl: command not found
。
私はLinuxの経験が非常に不足しているのですが、インストールの過程で間違いを犯した可能性があると思います。ツールをインストールするために実行したコマンドはpip install -U spotdl
(最初のソースによると)でした。ただし、2番目のソースコード(プロジェクトページなど)では、ツールが次のようpip3 install spotdl
に機能することを強調しながら他のコマンドを実行するように指示しますPython 3
。まあ、後者に気づく前に、私は前者が提供するステップに従いました。
それだけではありません。を実行すると、pip install -U spotdl
次のメッセージが表示されます。
XXXXs@pop-os:~$ pip install -U spotdl
'pip'コマンドが見つかりませんが、次のようにインストールできます。
sudo aptのインストールpython-pip
まあ、私はアドバイスに従うことに決め、上記のコマンドを実行しました。結果は次のとおりです。
XXXXs@pop-os:~$ sudo apt install python-pip
[sudo] password for XXXXs:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libllvm7 libllvm7:i386 libvala-0.40-0 valac-0.40-vapi
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libpython-all-dev libpython-dev libpython2.7-dev python-all python-all-dev
python-dev python-pip-whl python-setuptools python-wheel python-xdg
python2.7-dev
Suggested packages:
python-setuptools-doc
The following NEW packages will be installed:
libpython-all-dev libpython-dev libpython2.7-dev python-all python-all-dev
python-dev python-pip python-pip-whl python-setuptools python-wheel
python-xdg python2.7-dev
0 upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
Need to get 30.8 MB of archives.
After this operation, 46.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython2.7-dev amd64 2.7.15-4ubuntu4~18.04 [28.3 MB]
Get:2 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libpython-dev amd64 2.7.15~rc1-1 [7,684 B]
Get:3 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libpython-all-dev amd64 2.7.15~rc1-1 [1,092 B]
Get:4 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 python-all amd64 2.7.15~rc1-1 [1,076 B]
Get:5 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 python2.7-dev amd64 2.7.15-4ubuntu4~18.04 [278 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 python-dev amd64 2.7.15~rc1-1 [1,256 B]
Get:7 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 python-all-dev amd64 2.7.15~rc1-1 [1,100 B]
Get:8 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 python-pip-whl all 9.0.1-2.3~ubuntu1.18.04.1 [1,653 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 python-pip all 9.0.1-2.3~ubuntu1.18.04.1 [151 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 python-setuptools all 39.0.1-2 [329 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 python-wheel all 0.30.0-0.2 [36.4 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 python-xdg all 0.25-4ubuntu1 [31.3 kB]
Fetched 30.8 MB in 50s (614 kB/s)
Selecting previously unselected package libpython2.7-dev:amd64.
(Reading database ... 257811 files and directories currently installed.)
Preparing to unpack .../00-libpython2.7-dev_2.7.15-4ubuntu4~18.04_amd64.deb ...
Unpacking libpython2.7-dev:amd64 (2.7.15-4ubuntu4~18.04) ...
Selecting previously unselected package libpython-dev:amd64.
Preparing to unpack .../01-libpython-dev_2.7.15~rc1-1_amd64.deb ...
Unpacking libpython-dev:amd64 (2.7.15~rc1-1) ...
Selecting previously unselected package libpython-all-dev:amd64.
Preparing to unpack .../02-libpython-all-dev_2.7.15~rc1-1_amd64.deb ...
Unpacking libpython-all-dev:amd64 (2.7.15~rc1-1) ...
Selecting previously unselected package python-all.
Preparing to unpack .../03-python-all_2.7.15~rc1-1_amd64.deb ...
Unpacking python-all (2.7.15~rc1-1) ...
Selecting previously unselected package python2.7-dev.
Preparing to unpack .../04-python2.7-dev_2.7.15-4ubuntu4~18.04_amd64.deb ...
Unpacking python2.7-dev (2.7.15-4ubuntu4~18.04) ...
Selecting previously unselected package python-dev.
Preparing to unpack .../05-python-dev_2.7.15~rc1-1_amd64.deb ...
Unpacking python-dev (2.7.15~rc1-1) ...
Selecting previously unselected package python-all-dev.
Preparing to unpack .../06-python-all-dev_2.7.15~rc1-1_amd64.deb ...
Unpacking python-all-dev (2.7.15~rc1-1) ...
Selecting previously unselected package python-pip-whl.
Preparing to unpack .../07-python-pip-whl_9.0.1-2.3~ubuntu1.18.04.1_all.deb ...
Unpacking python-pip-whl (9.0.1-2.3~ubuntu1.18.04.1) ...
Selecting previously unselected package python-pip.
Preparing to unpack .../08-python-pip_9.0.1-2.3~ubuntu1.18.04.1_all.deb ...
Unpacking python-pip (9.0.1-2.3~ubuntu1.18.04.1) ...
Selecting previously unselected package python-setuptools.
Preparing to unpack .../09-python-setuptools_39.0.1-2_all.deb ...
Unpacking python-setuptools (39.0.1-2) ...
Selecting previously unselected package python-wheel.
Preparing to unpack .../10-python-wheel_0.30.0-0.2_all.deb ...
Unpacking python-wheel (0.30.0-0.2) ...
Selecting previously unselected package python-xdg.
Preparing to unpack .../11-python-xdg_0.25-4ubuntu1_all.deb ...
Unpacking python-xdg (0.25-4ubuntu1) ...
Setting up python-pip-whl (9.0.1-2.3~ubuntu1.18.04.1) ...
Setting up python-setuptools (39.0.1-2) ...
Setting up python-wheel (0.30.0-0.2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Setting up libpython2.7-dev:amd64 (2.7.15-4ubuntu4~18.04) ...
Setting up python-pip (9.0.1-2.3~ubuntu1.18.04.1) ...
Setting up python2.7-dev (2.7.15-4ubuntu4~18.04) ...
Setting up python-all (2.7.15~rc1-1) ...
Setting up python-xdg (0.25-4ubuntu1) ...
Setting up libpython-dev:amd64 (2.7.15~rc1-1) ...
Setting up python-dev (2.7.15~rc1-1) ...
Setting up libpython-all-dev:amd64 (2.7.15~rc1-1) ...
Setting up python-all-dev (2.7.15~rc1-1) ...
XXXXs@pop-os:~$ pip install -U spotdl
これで実行すると、次のようになりますpip -V
。Terminal
XXXXs@pop-os:~$ pip -V
pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)
XXXXs@pop-os:~$
もしそうなら、Python 2
私のシステムにそのプログラムがインストールされているということでしょう。この状況ではどうすればよいですか?Python 2
他の目的ではない場合は、システムの膨張を防ぐためにシステムから削除しますかPython 3
?しかし、どうすればいいのかわかりません:-(助けてくれてありがとう!
そうでない場合は、すでに次の最新バージョンがありますffmpeg
。
@pop-os:~$ sudo apt-get install ffmpeg
Reading package lists... Done
Building dependency tree
Reading state information... Done
ffmpeg is already the newest version (7:3.4.6-0ubuntu0.18.04.1).
The following packages were automatically installed and are no longer required:
libllvm7 libllvm7:i386 libvala-0.40-0 valac-0.40-vapi
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
XXXXs@pop-os:~$
spotdl
ああ、場合のためにインストールログは次のようになります。
XXXXs@pop-os:~$ pip install -U spotdl
Collecting spotdl
Downloading https://files.pythonhosted.org/packages/9a/6d/ b66a58f08890965f4afb94bc3738624407328fc12c081697ac18537d0446/spotdl-0.9.3.tar.gz
Collecting PyYAML =3.12 (from spotdl)
Downloading https://files.pythonhosted.org/packages/ a3/65/837fefac7475963d1eccf4aa684c23b95aa6c1d033a2c5965ccb11e22623/PyYAML-5.1.1.tar.gz (274kB)
100% |████████████████████████████████| 276kB 944kB/s
Collecting beautifulsoup4 =4.6.0 (from spotdl)
Downloading https://files.pythonhosted.org/packages/8b/0e/ 048a2f88bc4be5e3697df9dc1f7b9d5c9c75be62676feeeb91d2e896c5ea/beautifulsoup4-4.7.1-py2-none-any.whl (94kB)
100% |████████████████████████████████| 102kB 507kB/s
Collecting logzero =1.3.1 (from spotdl)
Downloading https://files.pythonhosted.org/packages/ 97/24/27295d318ea8976b12cf9cc51d82e7c7129220f6a3cc9e3443df3be8afdb/logzero-1.5.0-py2.py3-none-any.whl
Collecting lyricwikia =0.1.8 (from spotdl)
Downloading https://files.pythonhosted.org/packages/36/82/dfce4509b6097cdacfab4510a401ef007e8314a2d1d179267efd873d1a55/lyricwikia-0.1.9.tar.gz
Collecting mutagen =1.37 (from spotdl)
Downloading https://files.pythonhosted.org/packages/30/4c/ 5ad1a6e1ccbcfaf6462db727989c302d9d721beedd9b09c11e6f0c7065b0/mutagen-1.42.0.tar.gz (925kB)
100% |████████████████████████████████| 931kB 717kB/s
Collecting pafy =0.5.3.1 (from spotdl)
Downloading https://files.pythonhosted.org/packages/b0/e8/3516f761558525b00d3eaf73744eed5c267db20650b7b660674547e3e506/pafy-0.5.4-py2.py3-none-any.whl
Collecting pathlib =1.0.1 (from spotdl)
Downloading https://files.pythonhosted.org/packages/ac/aa/9b065a76b9af472437a0059f77e8f962fe350438b927cb80184c32f075eb/pathlib-1.0.1.tar.gz (49kB)
100% |████████████████████████████████| 51kB 948kB/s
Collecting spotipy =2.4.4 (from spotdl)
Downloading https://files.pythonhosted.org/packages/59/46/3c957255c96910a8a0e2d9c25db1de51a8676ebba01d7966bedc6e748822/spotipy-2.4.4.tar.gz
Collecting titlecase =0.10.0 (from spotdl)
Downloading https://files.pythonhosted.org/packages/3b/78/5b9faa7b9288c9fa5a4fdb6989f5e675744511ab6cff0489a0c7744a4f6b/titlecase-0.12.0.tar.gz
Collecting unicode-slugify =0.1.3 (from spotdl)
Downloading https://files.pythonhosted.org/packages/8c/ba/1a05f61c7fd72df85ae4dc1c7967a3e5a4b6c61f016e794bc7f09b2597c0/unicode-slugify-0.1.3.tar.gz
Collecting youtube_dl =2017.5.1 (from spotdl)
Downloading https://files.pythonhosted.org/packages/f6/05/908331f41e7ed52a3510c8927177056ffc7d26c3692ab87e3fad78081a05/youtube_dl-2019.6.21-py2.py3-none-any.whl (1.8MB)
100% |████████████████████████████████| 1.8MB 613kB/s
Collecting soupsieve =1.2 (from beautifulsoup4 =4.6.0- spotdl)
Downloading https://files.pythonhosted.org/packages/b9/a5/7ea40d0f8676bde6e464a6435a48bc5db09b1a8f4f06d41dd997b8f3c616/soupsieve-1.9.1-py2.py3-none-any.whl
Collecting requests (from lyricwikia =0.1.8- spotdl)
Downloading https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl (57kB)
100% |████████████████████████████████| 61kB 1.8MB/s
Collecting six (from lyricwikia =0.1.8- spotdl)
Downloading https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting unidecode (from unicode-slugify =0.1.3- spotdl)
Downloading https://files.pythonhosted.org/packages/d0/42/d9edfed04228bacea2d824904cae367ee9efd05e6cce7ceaaedd0b0ad964/Unidecode-1.1.1-py2.py3-none-any.whl (238kB)
100% |████████████████████████████████| 245kB 1.2MB/s
Collecting backports.functools-lru-cache; python_version < "3" (from soupsieve =1.2- beautifulsoup4 =4.6.0- spotdl)
Downloading https://files.pythonhosted.org/packages/03/8e/2424c0e65c4a066e28f539364deee49b6451f8fcd4f718fefa50cc3dcf48/backports.functools_lru_cache-1.5-py2.py3-none-any.whl
Collecting urllib3!=1.25.0,!=1.25.1,<1.26, =1.21.1 (from requests- lyricwikia =0.1.8- spotdl)
Downloading https://files.pythonhosted.org/packages/e6/60/247f23a7121ae632d62811ba7f273d0e58972d75e58a94d329d51550a47d/urllib3-1.25.3-py2.py3-none-any.whl (150kB)
100% |████████████████████████████████| 153kB 1.4MB/s
Collecting certifi =2017.4.17 (from requests- lyricwikia =0.1.8- spotdl)
Downloading https://files.pythonhosted.org/packages/69/1b/b853c7a9d4f6a6d00749e94eb6f3a041e342a885b87340b79c1ef73e3a78/certifi-2019.6.16-py2.py3-none-any.whl (157kB)
100% |████████████████████████████████| 163kB 771kB/s
Collecting chardet<3.1.0, =3.0.2 (from requests- lyricwikia =0.1.8- spotdl)
Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
100% |████████████████████████████████| 143kB 1.0MB/s
Collecting idna<2.9, =2.5 (from requests- lyricwikia =0.1.8- spotdl)
Downloading https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl (58kB)
100% |████████████████████████████████| 61kB 2.1MB/s
Building wheels for collected packages: spotdl, PyYAML, lyricwikia, mutagen, pathlib, spotipy, titlecase, unicode-slugify
Running setup.py bdist_wheel for spotdl ... done
Stored in directory: /home/XXXXs/.cache/pip/wheels/27/9b/65/5cd2c56c23f5566ace8fc31393943251124de819bd069f2d2c
Running setup.py bdist_wheel for PyYAML ... done
Stored in directory: /home/XXXXs/.cache/pip/wheels/16/27/a1/775c62ddea7bfa62324fd1f65847ed31c55dadb6051481ba3f
Running setup.py bdist_wheel for lyricwikia ... done
Stored in directory: /home/XXXXs/.cache/pip/wheels/5e/7d/5d/b77975b5cabfc8848a795a851b07b3fde7fd685b27e501d055
Running setup.py bdist_wheel for mutagen ... done
Stored in directory: /home/XXXXs/.cache/pip/wheels/33/4c/c3/6189a75038a7b00a8bc77fcb4dbdc38de335c55443f6680b13
Running setup.py bdist_wheel for pathlib ... done
Stored in directory: /home/XXXXs/.cache/pip/wheels/f9/b2/4a/68efdfe5093638a9918bd1bb734af625526e849487200aa171
Running setup.py bdist_wheel for spotipy ... done
Stored in directory: /home/XXXXs/.cache/pip/wheels/76/28/19/a86ca9bb0e32dbd4a4f580870250f5aeef852870578e0427e6
Running setup.py bdist_wheel for titlecase ... done
Stored in directory: /home/XXXXs/.cache/pip/wheels/9f/fb/8f/4d61939e2447b1b8c13f6ceeca035383c14d4228e88b174402
Running setup.py bdist_wheel for unicode-slugify ... done
Stored in directory: /home/XXXXs/.cache/pip/wheels/00/86/80/77ea75d401d5d6550a79179f76c6b26fe1280d40fb447ea4f3
Successfully built spotdl PyYAML lyricwikia mutagen pathlib spotipy titlecase unicode-slugify
Installing collected packages: PyYAML, backports.functools-lru-cache, soupsieve, beautifulsoup4, logzero, urllib3, certifi, chardet, idna, requests, six, lyricwikia, mutagen, pafy, pathlib, spotipy, titlecase, unidecode, unicode-slugify, youtube-dl, spotdl
Successfully installed PyYAML-5.1.1 backports.functools-lru-cache-1.5 beautifulsoup4-4.7.1 certifi-2019.6.16 chardet-3.0.4 idna-2.8 logzero-1.5.0 lyricwikia-0.1.9 mutagen-1.42.0 pafy-0.5.4 pathlib-1.0.1 requests-2.22.0 six-1.12.0 soupsieve-1.9.1 spotdl-0.9.3 spotipy-2.4.4 titlecase-0.12.0 unicode-slugify-0.1.3 unidecode-1.1.1 urllib3-1.25.3 youtube-dl-2019.6.21
XXXXs@pop-os:~$
私は何も完全に台無しにされていないことを願っています。あらかじめご協力いただきありがとうございます。
答え1
Python 2とPython 3は、競合なしに同じシステムにインストールできます。pip
Python 2バージョンをインストールしたのと同じように、Python 3バージョンをインストールできます。
sudo apt install python3-pip
pip3
これで、次のコマンドを使用してインストールできますspotdl
。
pip3 install spotdl
私は私のシステムでこれを試しましたが、インストールに失敗しました。*sudo
一般ユーザーとしてコマンドを実行したときに、プログラムを正常にインストールしたスーパーユーザー(を使用して)としてインストールする必要がありました/usr/local/bin/spotdl
。
Python 2 pipとインストール済みパッケージを削除する
本当にリソースが限られている場合、pipでインストールされているすべてのパッケージを削除する最も簡単な方法は何ですか?で削除する方法を示しますpip2
。
pip2 freeze | xargs pip2 uninstall -y
pip2
Debianパッケージを削除するには、sudo apt-get remove --purge python-pip
実行してsudo apt-get autoremove
不要になった依存関係を削除してください。
*pip
これは、おそらく数年前に現在のシステム(Ubuntu 16.04)を初めてインストールしたときに、インストールとソースが多すぎて面倒だったためです。pip3