gpt4 book ai didi

macos - 无法安装模块 'docstring'

转载 作者:行者123 更新时间:2023-12-05 08:55:53 28 4
gpt4 key购买 nike

我是 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'

所以我安装了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禁用此警告。

关于macos - 无法安装模块 'docstring',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43657677/

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