-
Notifications
You must be signed in to change notification settings - Fork 28.7k
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
Visual Studio Code .env file does not provide access to PYTHONPATH #94338
Comments
what are trying to achieve? debug? run task? |
Develop software- truly
Python at the command line does this ok.
…On Fri, 3 Apr 2020 at 17:22, Johannes Rieken ***@***.***> wrote:
what are trying to achieve? debug? run task?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#94338 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFPYWWXYMQTG2HOV5KVN4LRKV6C5ANCNFSM4L3OHKKQ>
.
|
I spent hours today isolating this problem
…On Fri, 3 Apr 2020 at 22:42, Peter Goodall ***@***.***> wrote:
Develop software- truly
Python at the command line does this ok.
On Fri, 3 Apr 2020 at 17:22, Johannes Rieken ***@***.***>
wrote:
> what are trying to achieve? debug? run task?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#94338 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAFPYWWXYMQTG2HOV5KVN4LRKV6C5ANCNFSM4L3OHKKQ>
> .
>
|
So, what isn't working you? What you are trying to achieve? What is the actual and expected behaviour? |
Thanks for your kind attention Johannes, I'm not sure what isn't clear from the problem description at the top, and the linked repository. So I will try and restate my problem - which could be a misunderstanding on my part. I have also updated the example code in my linked repository: https://github.com/pjgoodall/test_vscode_env What I'm trying to achieveStructure a project so I can have separate subdirectories which have .py files which I am using to explore various libraries without cluttering my main development sources. I want all my project efforts in the same simple git-controlled hierarchy. For instance I need to try out python logging, and interactions between pandas and threading. An example: They are non-trivial explorations (for me). As I evolve them towards being useful in my project I want to be able to import from the libraries I have developed for my main project. The libraries are in sibling directories to my exploration directories. I want to manage access to these libraries not hard-coded into my python source. To separate configuration from code - I don't want to encode paths into my source-code as suggested in stack exchange:
What isn't working for meI asked this question on stackexchange originally. Please read. After a bunch of docs - which I must say are confusing when trying to put them together, I imagined the inconsistency between my command-line environment and the debugger in vscode (see my stack-exchange post, linked above) could be resolved by moving the PYTHONPATH from using environment variable values configured using conda and autoenv, conda activate GBIF-REST-API
autostash PATH=$PWD:$PATH
autostash PYTHONPATH=$PWD:$PWD/python_modules into the vscode I assumed that The problems are:
My updated tests should show this. https://github.com/pjgoodall/test_vscode_env Cheers, |
I'm also starting to think |
Ok, I believe this should have been filed here: https://github.com/Microsoft/vscode-python. We only provide the "framework" in which python support operates and have little knowledge about its internals. |
Thanks Johannes, |
I also cannot simply transfer the issue.... |
/extPython |
Well not being able to transfer surely sucks |
Problem
I expect to be able to import from modules with subdirectories of the vscode
workplaceFolder
.If I try to append to PYTHONPATH using the environment file:
${workspaceFolder}/.env
, I get an empty reference to PYTHONPATH within that file. I therefore cannot add the path to my modules to PYTHONPATH from${workspaceFolder}/.env
I do not want to hard-code a manipulation of the environment into my python source.
This may be an interaction complexity between vscode and conda virtual environments
Files to recreate the environment, and further documentation are in the public github repository https://github.com/pjgoodall/test_vscode_env
The text was updated successfully, but these errors were encountered: