asdf를 통해 Python 설치: pip 설치에서 요구 사항이 충족되었다고 표시되어도 scrapy 패키지를 찾을 수 없습니다.

asdf를 통해 Python 설치: pip 설치에서 요구 사항이 충족되었다고 표시되어도 scrapy 패키지를 찾을 수 없습니다.

저는 Arch Linux를 실행 중이고 패키지를 업데이트했습니다.

나는 가지고있다asdf런타임 및 SDK 등을 관리합니다.

내 프로젝트 루트에 다음 .tool-versions파일이 있습니다.

~/code/bejebeje-bot main !1 ?1 ❯ \cat .tool-versions                                                                                                                                                                       3.10.2
python 3.10.2

그럼 난 해냈어 asdf reshim python. 그런 다음 scrapyPython 패키지를 설치하려고 시도했고 pip다음과 같은 결과를 얻었습니다.

~/code/bejebeje-bot main !1 ?1 ❯ pip install scrapy                                                                                                                                                                        3.10.2
Requirement already satisfied: scrapy in /home/j/.local/lib/python3.10/site-packages (2.6.1)
Requirement already satisfied: pyOpenSSL>=16.2.0 in /home/j/.asdf/installs/python/3.10.2/lib/python3.10/site-packages (from scrapy) (22.0.0)
Requirement already satisfied: cryptography>=2.0 in /home/j/.asdf/installs/python/3.10.2/lib/python3.10/site-packages (from scrapy) (36.0.1)
Requirement already satisfied: protego>=0.1.15 in /home/j/.local/lib/python3.10/site-packages (from scrapy) (0.2.1)
Requirement already satisfied: w3lib>=1.17.0 in /home/j/.local/lib/python3.10/site-packages (from scrapy) (1.22.0)
Requirement already satisfied: itemloaders>=1.0.1 in /home/j/.local/lib/python3.10/site-packages (from scrapy) (1.0.4)
Requirement already satisfied: zope.interface>=4.1.3 in /home/j/.local/lib/python3.10/site-packages (from scrapy) (5.4.0)
Requirement already satisfied: setuptools in /home/j/.asdf/installs/python/3.10.2/lib/python3.10/site-packages (from scrapy) (58.1.0)
Requirement already satisfied: service-identity>=16.0.0 in /home/j/.local/lib/python3.10/site-packages (from scrapy) (21.1.0)
Requirement already satisfied: cssselect>=0.9.1 in /home/j/.local/lib/python3.10/site-packages (from scrapy) (1.1.0)
Requirement already satisfied: lxml>=3.5.0 in /home/j/.local/lib/python3.10/site-packages (from scrapy) (4.8.0)
Requirement already satisfied: PyDispatcher>=2.0.5 in /home/j/.local/lib/python3.10/site-packages (from scrapy) (2.0.5)
Requirement already satisfied: itemadapter>=0.1.0 in /home/j/.local/lib/python3.10/site-packages (from scrapy) (0.4.0)
Requirement already satisfied: tldextract in /home/j/.local/lib/python3.10/site-packages (from scrapy) (3.2.0)
Requirement already satisfied: queuelib>=1.4.2 in /home/j/.local/lib/python3.10/site-packages (from scrapy) (1.6.2)
Requirement already satisfied: Twisted>=17.9.0 in /home/j/.local/lib/python3.10/site-packages (from scrapy) (22.2.0)
Requirement already satisfied: parsel>=1.5.0 in /home/j/.local/lib/python3.10/site-packages (from scrapy) (1.6.0)
Requirement already satisfied: cffi>=1.12 in /home/j/.asdf/installs/python/3.10.2/lib/python3.10/site-packages (from cryptography>=2.0->scrapy) (1.15.0)
Requirement already satisfied: jmespath>=0.9.5 in /home/j/.asdf/installs/python/3.10.2/lib/python3.10/site-packages (from itemloaders>=1.0.1->scrapy) (0.10.0)
Requirement already satisfied: six>=1.6.0 in /home/j/.asdf/installs/python/3.10.2/lib/python3.10/site-packages (from parsel>=1.5.0->scrapy) (1.16.0)
Requirement already satisfied: pyasn1-modules in /home/j/.local/lib/python3.10/site-packages (from service-identity>=16.0.0->scrapy) (0.2.8)
Requirement already satisfied: pyasn1 in /home/j/.asdf/installs/python/3.10.2/lib/python3.10/site-packages (from service-identity>=16.0.0->scrapy) (0.4.8)
Requirement already satisfied: attrs>=19.1.0 in /home/j/.local/lib/python3.10/site-packages (from service-identity>=16.0.0->scrapy) (21.4.0)
Requirement already satisfied: Automat>=0.8.0 in /home/j/.local/lib/python3.10/site-packages (from Twisted>=17.9.0->scrapy) (20.2.0)
Requirement already satisfied: typing-extensions>=3.6.5 in /home/j/.local/lib/python3.10/site-packages (from Twisted>=17.9.0->scrapy) (4.1.1)
Requirement already satisfied: incremental>=21.3.0 in /home/j/.local/lib/python3.10/site-packages (from Twisted>=17.9.0->scrapy) (21.3.0)
Requirement already satisfied: constantly>=15.1 in /home/j/.local/lib/python3.10/site-packages (from Twisted>=17.9.0->scrapy) (15.1.0)
Requirement already satisfied: hyperlink>=17.1.1 in /home/j/.local/lib/python3.10/site-packages (from Twisted>=17.9.0->scrapy) (21.0.0)
Requirement already satisfied: requests>=2.1.0 in /home/j/.asdf/installs/python/3.10.2/lib/python3.10/site-packages (from tldextract->scrapy) (2.27.1)
Requirement already satisfied: idna in /home/j/.asdf/installs/python/3.10.2/lib/python3.10/site-packages (from tldextract->scrapy) (3.3)
Requirement already satisfied: requests-file>=1.4 in /home/j/.local/lib/python3.10/site-packages (from tldextract->scrapy) (1.5.1)
Requirement already satisfied: filelock>=3.0.8 in /home/j/.local/lib/python3.10/site-packages (from tldextract->scrapy) (3.6.0)
Requirement already satisfied: pycparser in /home/j/.asdf/installs/python/3.10.2/lib/python3.10/site-packages (from cffi>=1.12->cryptography>=2.0->scrapy) (2.21)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /home/j/.asdf/installs/python/3.10.2/lib/python3.10/site-packages (from requests>=2.1.0->tldextract->scrapy) (1.26.8)
Requirement already satisfied: charset-normalizer~=2.0.0 in /home/j/.asdf/installs/python/3.10.2/lib/python3.10/site-packages (from requests>=2.1.0->tldextract->scrapy) (2.0.12)
Requirement already satisfied: certifi>=2017.4.17 in /home/j/.asdf/installs/python/3.10.2/lib/python3.10/site-packages (from requests>=2.1.0->tldextract->scrapy) (2021.10.8)

실행해 보면 실제로 존재하는 pip list것을 볼 수 있어요 Scrapy!

~/code/bejebeje-bot main !1 ?1 ❯ pip list                                                                                                                                                                                  3.10.2
Package            Version
------------------ ---------
attrs              21.4.0
Automat            20.2.0
certifi            2021.10.8
cffi               1.15.0
charset-normalizer 2.0.12
constantly         15.1.0
cryptography       36.0.1
cssselect          1.1.0
filelock           3.6.0
hyperlink          21.0.0
idna               3.3
incremental        21.3.0
itemadapter        0.4.0
itemloaders        1.0.4
jmespath           0.10.0
lxml               4.8.0
parsel             1.6.0
pip                22.0.4
pipx               1.0.0
Protego            0.2.1
pyasn1             0.4.8
pyasn1-modules     0.2.8
pycparser          2.21
PyDispatcher       2.0.5
pyOpenSSL          22.0.0
queuelib           1.6.2
requests           2.27.1
requests-file      1.5.1
Scrapy             2.6.1
service-identity   21.1.0
setuptools         58.1.0
six                1.16.0
tldextract         3.2.0
Twisted            22.2.0
typing_extensions  4.1.1
urllib3            1.26.8
userpath           1.7.0
w3lib              1.22.0
zope.interface     5.4.0

그러나 scrapy명령이 인식되지 않고 스파이더를 실행하려고 하면 다음과 같은 결과가 나타납니다.

~/code/bejebeje-bot/gsscraper main !1 ?1 ❯ scrapy crawl gsspider -o stran.json                                                                                                                                             3.10.2
zsh: command not found: scrapy

내가 실행하면 asdf current다음을 얻습니다.

~/code/bejebeje-bot main !1 ?1 ❯ asdf current                                                                                                                                                                              3.10.2
nodejs          ______          No version is set. Run "asdf <global|shell|local> nodejs <version>"
python          3.10.2          /home/j/code/bejebeje-bot/.tool-versions

내가 여기서 뭘 잘못하고 있는 걸까? 왜 나는 달릴 수 없나요 scrapy? 혼란스러워요.

추신. 태그를 추가하고 싶은데 asdf포인트가 부족합니다.

고쳐 쓰다

나는 달려가서 pip show scrapy다음을 얻었다:

~/code/bejebeje-bot main !1 ?1 ❯ pip show scrapy                                                                                                                                                                           3.10.2
Name: Scrapy
Version: 2.6.1
Summary: A high-level Web Crawling and Web Scraping framework
Home-page: https://scrapy.org
Author: Scrapy developers
Author-email: 
License: BSD
Location: /home/j/.local/lib/python3.10/site-packages
Requires: cryptography, cssselect, itemadapter, itemloaders, lxml, parsel, protego, PyDispatcher, pyOpenSSL, queuelib, service-identity, setuptools, tldextract, Twisted, w3lib, zope.interface
Required-by: 

내 생각엔 이 위치가 저 아래 어딘가에 있어야 할 것 같아 /home/j/.asdf/shims/! 광산에는 $PATH다음이 있습니다.

~/code/bejebeje-bot main !1 ?1 ❯ sed 's/:/\n/g' <<< "$PATH"                                                                                                                                                                3.10.2
/home/j/.asdf/shims
/opt/asdf-vm/bin
/usr/local/sbin
/usr/local/bin
/usr/bin
/usr/local/go/bin
/home/j/code/go/bin
/home/j/.dotnet/tools
/usr/lib/jvm/default/bin
/usr/bin/site_perl
/usr/bin/vendor_perl
/usr/bin/core_perl
/usr/local/go/bin
/home/j/code/go/bin
/usr/local/go/bin
/home/j/code/go/bin
/home/j/.dotnet
/home/j/.dotnet/tools
~/programs/JetBrains Rider-2021.3.3/bin

관련 정보