youtype / boto3-ide

Code auto-complete and type checking for AWS boto3 in your VSCode
MIT License
20 stars 2 forks source link

Often does not detect pipenv, defaults to pip #3

Closed felipe1982 closed 2 years ago

felipe1982 commented 2 years ago

I use pipenv in my environment, and often Boto3-ide does not pick it up, instead defaulting to pip. I have set my default interpreter to use my pipenv environment, and reloaded VSCode, but this problem remains.

image image

vemel commented 2 years ago

Hello! The extension checks if Pipfile.lock is present in project root. So, two possible cases: no lockfile, or I incorrectly detect project root. Do you have a lockfile?

felipe1982 commented 2 years ago

I have many workspaces (... Or folders or repositories) open in 1 single vscode window. Some have Pipfile.lock but no guarantee all do.

vemel commented 2 years ago

I take into account only the first workspace. I should check how python extension finds an active workspace

vemel commented 2 years ago

I have just added support for multiple directories in one workspace. Now pipenv/poetry should be available if any of the directories have a lock file. Also, this directory will be chosen as a workDir (so, the installer changes the working directory to the one with a lock file before installing packages). For now, it is not possible to choose work dir if you have multiple lock files, the first one is selected.

vemel commented 2 years ago

Please let me know if this solution works for you.

felipe1982 commented 2 years ago

It appears to work, close this, and I'll open again if it returns. :)