新人第一问要哭了Mac OS zsh: command not found: wikipedia怎么办
问题
pip 下载量维基百科的包,显示成功,但是调用的时候zsh: command not found,重新安装,跟我说已存在,查看pip3 list都在啊
安装scrapy、pandas也是同样问题
平台
macOS
相关代码
jiawang@maomaojiazuMac ~ % pip3 install wikipediaWARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Requirement already satisfied: wikipedia in ./Library/Python/3.8/lib/python/site-packages (1.4.0)
Requirement already satisfied: requests<3.0.0,>=2.0.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from wikipedia) (2.23.0)
Requirement already satisfied: beautifulsoup4 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from wikipedia) (4.9.0)
Requirement already satisfied: chardet<4,>=3.0.2 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from requests<3.0.0,>=2.0.0->wikipedia) (3.0.4)
Requirement already satisfied: idna<3,>=2.5 in ./Library/Python/3.8/lib/python/site-packages (from requests<3.0.0,>=2.0.0->wikipedia) (2.9)
Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from requests<3.0.0,>=2.0.0->wikipedia) (2020.4.5.1)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from requests<3.0.0,>=2.0.0->wikipedia) (1.25.9)
Requirement already satisfied: soupsieve>1.2 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from beautifulsoup4->wikipedia) (2.0)
jiawang@maomaojiazuMac ~ % wikipedia
zsh: command not found: wikipedia
Installing collected packages: python-dateutil, numpy, pandasSuccessfully installed numpy-1.18.3 pandas-1.0.3 python-dateutil-2.8.1
jiawang@x86\_64-apple-darwin13 ~ % pandas
zsh: command not found: pandas
试过在vim添加source ~.bash_profile无效
vim .zshrcsource ~.bash_profile
查询pip3 list显示存在
Usage: pip3 list \[options\]
option --format: invalid choice: 'colums' (choose from 'columns', 'freeze', 'json')
jiawang@x86\_64-apple-darwin13 ~ % pip3 list --format=columns | grep wikipedia
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
wikipedia 1.4.0
jiawang@x86\_64-apple-darwin13 ~ % pip3 list --format=columns | grep pandas pandas 1.0.3
jiawang@x86\_64-apple-darwin13 ~ %
各位大佬帮帮我,怎么搞啊
回答:
wikipedia貌似不提供命令
检查有没有安装成功pip3 list --format=legacy | grep wikipedia
以上是 新人第一问要哭了Mac OS zsh: command not found: wikipedia怎么办 的全部内容, 来源链接: utcz.com/p/937812.html