无法安装模块 'docstring'

Cannot install module 'docstring'

我是 Python(来自 C++)的新手,运行 Brackets 中的一些测试代码。现在 pylint 抱怨说:

C0111 > Missing module docstring [missing-docstring @ 1,0]

所以我尝试安装它:

Manuelas-MacBook:~ manu$ sudo -H pip install docstring
Collecting docstring
  Downloading docstring-0.1.2.4.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/tmp/pip-build-ex4m9h3o/docstring/setup.py", line 2, in <module>
        import docstring
      File "/private/tmp/pip-build-ex4m9h3o/docstring/docstring/__init__.py", line 11, in <module>
        from utils import Endpoint
    ModuleNotFoundError: No module named 'utils'

所以我安装了实用程序:

sudo -H pip install utils

现在我被这个困住了:

Manuelas-MacBook:~ manu$ sudo -H pip install docstring
Collecting docstring
  Using cached docstring-0.1.2.4.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/tmp/pip-build-5bn12ekx/docstring/setup.py", line 2, in <module>
        import docstring
      File "/private/tmp/pip-build-5bn12ekx/docstring/docstring/__init__.py", line 11, in <module>
        from utils import Endpoint
    ImportError: cannot import name 'Endpoint'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-5bn12ekx/docstring/

而且我真的不知道如何从这里开始。

我最近安装了 python3(在 Mac 上)。我会不会有版本冲突?

Manuelas-MacBook:~ manu$ python --version
Python 3.6.0 :: Anaconda 4.3.1 (x86_64)

Manuelas-MacBook:~ manu$ pip --version
pip 9.0.1 from /Users/manu/anaconda/lib/python3.6/site-packages (python 3.6)

错误信息很不清楚。实际上,pylint 不需要任何额外的模块:它只是希望您记录 您的 模块。

您可能需要查看 this question 以禁用此警告。

另一个答案似乎可能有帮助,因为我在我的盒子上遇到了完全相同的问题(Linux Mint,Python 3.6)。原因可能是文档字符串(尚未)与 Python3 兼容。

Collecting docstring
  Using cached docstring-0.1.2.4.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-v8oxns74/docstring/setup.py", line 2, in <module>
        import docstring
      File "/tmp/pip-build-v8oxns74/docstring/docstring/__init__.py", line 11, in <module>
        from utils import Endpoint
    ImportError: cannot import name 'Endpoint'