Python Forum
pylint & #! - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: pylint & #! (/thread-18564.html)



pylint & #! - pileofrogs - May-22-2019

Hi all. I've got code that looks like:

#! /usr/bin/python3
'''
A script that does stuff
'''
from lib.utils import thingy
And pylint says:

Error:
E0611: No name 'utils' in module 'lib' (no-name-in-module
Even though the script works fine. (There's a lib dir inside my CWD that contains utils.py)

If I remove the
#! /usr/bin/python3
pylint stops complaining.

Does anyone know why this might be?

Thanks!


RE: pylint & #! - heiner55 - May-23-2019

I have Linux Debian:

There is pylint for Python2.x
and pylint3 for Python3.x

apt install pylint
apt install pylint3

With pylint3 your code should lint OK.