3

I'm new to Python (coming from C++), running some test code in Brackets. Now pylint complains saying:

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

so I tried installing it:

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'

So I installed utils:

sudo -H pip install utils

Now I am stuck with this:

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/

And I don't really know how to go from here.

I had recently installed python3 (on Mac). Could I have a version collision?

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)
Manuela Hutter
  • 823
  • 9
  • 16

2 Answers2

5

The error message is quite unclear. Acutally, pylint doesn't need any extra module : it just wants you to document your module.

You may want to take a look at this question to disable this warning.

B. Barbieri
  • 1,055
  • 13
  • 16
  • ah, that's it! I realized that it wanted me to document, but I did think that it needed the docstring module for that. thanks for the clarification! – Manuela Hutter Apr 28 '17 at 09:16
4

The other answer seem to be probably helpful as I am getting exactly the same problem on my box (Linux Mint, Python 3.6). The reason may be that docstring is not (yet) compatible with 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'
Claudio
  • 7,474
  • 3
  • 18
  • 48