0

我尝试安装模块“Chatterbot 0.4.6”,但失败并出现以下错误:

Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 317, in run
    prefix=options.prefix_path,
  File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 742, in install
    **kwargs
  File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 831, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 1032, in move_wheel_files
    isolated=self.isolated,
  File "/Library/Python/2.7/site-packages/pip/wheel.py", line 346, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/Library/Python/2.7/site-packages/pip/wheel.py", line 317, in clobber
    ensure_dir(destdir)
  File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
    os.makedirs(path)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/nltk'

什么可能导致这种情况发生?

4

3 回答 3

3

正如@Adryr83 正确推荐的那样,sudo在安装带有pip.

例如:

sudo pip install chatterbot

于 2017-06-09T04:28:21.607 回答
0

试试这个 sudo pip3 install chatterbot

于 2017-07-15T23:22:38.753 回答
0

@Adryr83 您可以尝试使用安装Chatterbot 0.4.6pip install ChatterBot==0.4.6

来源:https ://pypi.org/project/ChatterBot/0.4.6/

于 2020-08-17T10:14:27.593 回答