Pop!_OS: Spotify 다운로더(spotdl: 명령을 찾을 수 없음)

Pop!_OS: Spotify 다운로더(spotdl: 명령을 찾을 수 없음)

최근에 spotdl다음 URL의 지침에 따라 (Spotify 다운로더)를 설치했습니다.GitHub 설치 페이지. 하지만 도구를 실행하고 제공된 명령을 실행하려고 하면프로젝트 페이지, Terminal결과에 다음 메시지가 표시됩니다. spotdl: command not found.

저는 리눅스에 대한 경험이 상당히 부족한 편인데, 설치 과정에서 실수를 했을 수도 있겠다는 생각이 듭니다. 도구를 설치하기 위해 실행한 명령은 pip install -U spotdl(첫 번째 소스에 따르면)이었습니다. 그러나 두 번째 소스 코드(예: 프로젝트 페이지)에서는 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은 충돌 없이 동일한 시스템에 설치할 수 있습니다. pipPython 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

pip2Debian 패키지를 제거하려면 sudo apt-get remove --purge python-pip실행하여 sudo apt-get autoremove더 이상 필요하지 않은 종속성을 제거하세요.


*pip 이는 아마도 몇 년 전 현재 시스템(Ubuntu 16.04)을 처음 설치했을 때 설치와 소스가 너무 많아서 번거로웠 기 때문일 것입니다 .pip3

관련 정보