Cery
Cery

Reputation: 221

python Module management in VsCode

Although the PyCharm(a ide for python) is very strong and powerful,unfortunately,i found that it really Occupies Memory and CPU resources.

Then i come up to the VsCode(a lightly text editor),you know,i use anaconda to manage my python package,unfortunately,a weird case happen enter image description here

i'am sure that this module is in my "tmp" folder,but the interpreter seems not recognize my module.

i guess that there must be some problems in my vs code setting

here is my vs code setting

"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.pythonPath": "F:\\Anaconda3\\envs\\tensorflow_cpu\\python.exe"

is there any module management in vs code ? by the way, even if i enter in the "tmp" folder,the interpreter still doesn't work.

Upvotes: 1

Views: 3031

Answers (1)

Braca
Braca

Reputation: 2815

I've had a lot of problems enabling pylint, and after spending 2 days changing all possible settings I switched linter to flake8. Everything just works from the first try, and it's great. Try enabling flake8 first, then if it doesn't work, you'll have to change your settings and if it does just use it.

If your code can't find your module try this:

  1. Create a file named .env in your project root directory
  2. Add the following contents to the .env file:

    PYTHONPATH=path to your module folder

Upvotes: 2

Related Questions