-
Notifications
You must be signed in to change notification settings - Fork 133
language server cannot resolve import with editable mode package #989
Comments
I just ran into this as well, here's my reproduction repository using EDIT: Here's a another slightly smaller repo that has the same problem with editable mode: https://github.com/chdsbd/vscode-pythonpath-reproduction |
Seems like we don't fully support |
Not sure if it would be easy to bisect, but this used to work in previous versions. |
@jakebailey do you if support for editable installs is being worked on? |
See also #1013, which has provided more insight. We have a way to set roots via extraPaths (a VSC extension option) and PYTHONPATH, which should work, but is not due to configuration we're picking up as interpreter search paths due to pth files. |
Is there any updates? This problem bother me almost 2 month. |
Well, since item is not assigned to anyone and has no associated milestone, no immediate work is planned. If you install ZenHub Chrome/EdgeDev extension, you should be able to see our schedule and planned work. |
Is it possible you could place this issue somewhere higher on the list? It would be greatly appreciated. There is a bunch of people who reported multiple issues about it:
editable-installs
For now the only solution is to switch back to Jedi. |
@chudytom @MikhailArkhipov Could you tell me how to "switch back to jedi"? Does this fix the issue? |
Set |
Using the original example, this too can be fixed by configuration that points us to the different import roots: This is the most similar to what you can do as in #989 (comment) Perhaps we just need to make this configuration easier to work with / more visible. However, I know that there's some oddity when this gets mixed with editable installs, which I'm going to start looking into. |
At the moment, our current recommendation is to use the A fix to editable installs was merged in #1183 (v0.3.1+), and will be available in the daily download channel shortly (and stable likely after). To switch to this for testing, you can set: "python.analysis.downloadChannel": "daily" Inferring this information automatically is more difficult than it seems, but there is likely work that can be done on that front in the future. |
@crhan commented on Wed Mar 27 2019
Environment data
Expected behaviour
vscode can go to my package's definition
Actual behaviour
unresolved import 'namespaced.b'
Steps to reproduce:
pip install package_a; pip install -e package_b; pip install -e package_c
-e
option cannot resolved by language server.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
)@crhan commented on Wed Mar 27 2019
PS: package installed directly(without
-e
option) is resolved correctly@crhan commented on Wed Mar 27 2019
should i move the issue to language server repo issue tracker?
@MarekOzana commented on Thu Mar 28 2019
I have exactly the same issue with
conda develop
packages. The issue started directly after the latest (2019.3.6139) python extension update.@joel-wright commented on Fri Apr 12 2019
I'm experiencing this problem as well, but I couldn't find a related open bug against the language server.
The text was updated successfully, but these errors were encountered: