Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python.autoComplete.extraPaths not working #2791

Closed
ddor254 opened this issue Oct 4, 2018 · 1 comment
Closed

python.autoComplete.extraPaths not working #2791

ddor254 opened this issue Oct 4, 2018 · 1 comment

Comments

@ddor254
Copy link

ddor254 commented Oct 4, 2018

Environment data

  • VS Code version: Version: 1.27.2
  • Extension version (available under the Extensions sidebar): XXX
  • OS and version: ubuntu 16.04 LTS
  • Python version (& distribution if applicable, e.g. Anaconda): Python 2.7.12

Actual behavior

paths in python.autoComplete.extraPaths does not work

Expected behavior

paths in python.autoComplete.extraPaths will behave same as adding the folder to sys.path

Steps to reproduce:

Create a ~/Desktop/extras folder.
Create a file named foobar.py in that folder containing def spam(): pass
Set python.autoComplete.extraPaths to point to the extras folder
import foobar; foobar. should have spam in its completion list.
getting [pylint] E0401:Unable to import extra and there is no completion.

I installed the latest VScode version , following this commit : #1471

still does not work.

@DonJayamanne
Copy link

python.autoComplete.extraPaths is used only for auto complete (intellisence).
Pylint, is a linter.
To let this working,

  • Please create a file named .env
  • Add an environment variable in there as follows:
    PYTHONPATH=<fully qualified path>

That should fix it

@lock lock bot locked as resolved and limited conversation to collaborators Nov 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants