Closed JeffHanna closed 5 years ago
Hi @JeffHanna π thank you for reaching out! However, I can't reproduce your issue (VS Code 1.37.1, extension 2019.8.30787) with this script:
import numpy as np
import matplotlib.pyplot as plt
plt.plot([1, 2, 3, 4])
plt.ylabel('some numbers')
plt.show()
test = np.arange(15).reshape(3, 5)
path/to/python/Scripts/pylint path/to/script.py
)?Thanks!
Hi Kim,
Yes, upon further investigation I believe the issue is with Pylint itself. Unless Pylint is installed in the virtual environment it generates false positives about modules installed in those virtual environments. I'm going to try this (https://pypi.org/project/pylint-venv/) to see if it solves my problem. Thank you for your help and investigation. I'm sorry for wasting your time.
On Thu, Aug 15, 2019 at 3:19 PM Kim-Adeline Miguel notifications@github.com wrote:
Hi @JeffHanna https://github.com/JeffHanna π thank you for reaching out! However, I can't reproduce your issue (VS Code 1.37.1, extension 2019.8.30787) with this script:
import numpy as np import matplotlib.pyplot as plt
plt.plot([1, 2, 3, 4])
plt.ylabel('some numbers')
plt.show()
test = np.arange(15).reshape(3, 5)
- Do you have some sample code (a script or a repo) I could use?
- Does the issue also occur if you run pylint in a standalone terminal window (path/to/python/Scripts/pylint path/to/script.py)?
Thanks!
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode-python/issues/6976?email_source=notifications&email_token=AABE3V7PCPTTKHCUDW75A7TQEW25VA5CNFSM4IL5THM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4M4K7A#issuecomment-521782652, or mute the thread https://github.com/notifications/unsubscribe-auth/AABE3V2M72GMCNNEYKDDRR3QEW25VANCNFSM4IL5THMQ .
No problem! Feel free to reopen this issue if it doesn't work and we'll be happy to help you!
Environment data
"python.jediEnabled"
set to; more info #3977): PLSExpected behaviour
Pylint would not generate false positive "Unable to import..." errors for 3rd party modules in my script.
Actual behaviour
Pylint generates "Unable to import..." errors for both matplotlib and numpy 3rd party modules installed into my virtual environment.
Steps to reproduce:
Logs
Output for
Python
in theOutput
panel (View
βOutput
, change the drop-down the upper-right of theOutput
panel toPython
)Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging
)