Skip to content

pylint is unable to import distutils.version under virtualenv #73

Closed
pylint-dev/astroid
#672
@pylint-bot

Description

@pylint-bot

Originally reported by: Chris Rebert (BitBucket: cvrebert, GitHub: @cvrebert?)


Testcase:

#!python

#!/usr/bin/env python2.7
import distutils.version

Output:

#!txt

************* Module foo
foo.py:1: [C0111(missing-docstring), ] Missing module docstring
foo.py:2: [F0401(import-error), ] Unable to import 'distutils.version'
foo.py:2: [E0611(no-name-in-module), ] No name 'version' in module 'distutils'
foo.py:2: [W0611(unused-import), ] Unused import distutils

Which doesn't agree with Python itself:

#!python

$ python
Python 2.7.3 (default, Apr 10 2013, 06:20:15) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import distutils.version
>>> # no error

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions