-
Notifications
You must be signed in to change notification settings - Fork 41
Using with virtualenv created with --system-site-packages
, system libraries are unresolved
#132
Comments
--system-site-packages
, system libraries are unresolved--system-site-packages
, activated via direnv
, system libraries are unresolved
Edit: I was wrong. See next comment |
Reopening as there's a real issue here. Though it may well be in the MS LSP. I've poked around this for a while. Thinking my environment was at fault I abandoned I found errors in
And yet running python interactively etc., this code executes fine. Through some debug print statements I found this function called multiple times, sometimes successfully, sometimes not. When unsuccessful, the Python interpreter was weirdly stripped-down - no Simply manually stripping out the |
--system-site-packages
, activated via direnv
, system libraries are unresolved--system-site-packages
, system libraries are unresolved
@WJCFerguson so that means it's an issue of mspyls? |
That does have to be a strong assumption but it's hard for me to tell until/unless I can debug more deeply. Though the only reference to that error with mspyls is one page in Chinese may well be discussing the same thing w.r.t. lsp-python-ms: https://emacs-china.org/t/lsp-python-ms-python2/12300. |
Working with a virtualenv (Py2.7 in this case) build
--system-site-packages
and activated viadirenv
, system libraries such asos
, are not found bylsp
and are marked asunresolved-import
. Interactive python can import them fine, and VS Code also seems happy, shows documentation etc..To reproduce:
(for reference I put a testing emacs minimal
lsp
init.el
I used below)system-site-packages
, e.g.:unresolved-import 'os'
messages, though sometimes they disappear until I make an edit to the fileEmacs version: 27.1
lsp-python-ms version 0.7.1
I tried to dig in a bit but didn't get far. I can tell you that
lsp-python-ms--get-python-ver-and-syspath
returnedpaths
including/usr/lib/python2.7
etc. whereos
lives, so that seemed in order to me.For testing to isolate from my emacs config, I made this minimal
use-package
init.el and ranemacs -q -l init.el foo.py
:Thank you for this package, and please let me know what investigation I can do or how I can help.
The text was updated successfully, but these errors were encountered: