python-lsp / python-lsp-server

Fork of the python-language-server project, maintained by the Spyder IDE team and the community
MIT License
1.88k stars 195 forks source link

No pyenv.cfg #347

Closed eyalk11 closed 1 year ago

eyalk11 commented 1 year ago

I am on windows. I am getting this error

[INFO][2023-01-28 03:50:23] .../vim/lsp/rpc.lua:661 "Starting RPC client"   {  args = {},  cmd = "pylsp",  extra = {    cwd = "C:/Users/uname/proj",    env = {      PATH = "XXX"     }  }}
[ERROR][2023-01-28 03:50:22] .../vim/lsp/rpc.lua:733    "rpc"   "pylsp" "stderr"    "No pyvenv.cfg file\r\n"

I do have pyenv.cfg in my venv.

eyalk11 commented 1 year ago

Well, apperently, C:\Users\uname\AppData\Local\nvim-data\lsp_servers\pylsp\venv\Scripts doesn't have pylsp.cfg and it is really screwed up . LspInstall probably did a bad job. But I have setup up this, and still can't work there.

After further investigation, I saw that python -m venv creates it without pip. And tried to create with pycharm.

There I saw:

‘virtualenv.create.via_global_ref.builtin.cpython.mac_os’ has no attribute ‘CPython2macOsArmFramework’

And so, what I needed to do was to choose another python version and to install the venv myself. Seems to be working!