gpt4 book ai didi

python - 找不到 "six",但已安装

转载 作者:太空狗 更新时间:2023-10-29 18:19:16 24 4
gpt4 key购买 nike

我安装了六个(甚至重新安装了它)。

$ pip show six
---
Name: six
Version: 1.7.3
Location: /usr/lib/python2.6/site-packages
Requires:

但是当我尝试运行 csvcut 时,它找不到它。

$ csvcut -n monster.csv
Traceback (most recent call last):
File "/usr/bin/csvcut", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2655, in <module>
working_set.require(__requires__)
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 648, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 546, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: six>=1.6.1

这是 csvcut 的相关内容:

#!/usr/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'csvkit==0.8.0','console_scripts','csvcut'
__requires__ = 'csvkit==0.8.0'
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
sys.exit(
load_entry_point('csvkit==0.8.0', 'console_scripts', 'csvcut')()
)

这是在 CentOS 上。

最佳答案

使用 pip 卸载并重新安装 6 没有工作

sudo pip uninstall six
sudo pip install six

但是,我能够使用 easy_install 解决问题:

easy_install --upgrade six

关于python - 找不到 "six",但已安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25185300/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com