Skip to content
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

jedi.api.environment.InvalidPythonEnvironment: <conda_env_path>/bin/python seems to be missing. #556

Open
MordorianGuy opened this issue May 7, 2024 · 0 comments

Comments

@MordorianGuy
Copy link

I get this error with the 1.10.1 version. The binary exists and is named as python3.12. The path to the environment was set via pylsp.plugins.jedi.environment option.
Full traceback:

<datetime> - WARNING - pylsp.config.config - Failed to load hook pylsp_hover: <work_env_path>/bin/python seems to be missing.
Traceback (most recent call last):
  File "<lab_env_path>/lib/python3.11/site-packages/pylsp/config/config.py", line 39, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<lab_env_path>/lib/python3.11/site-packages/pluggy/_manager.py", line 473, in traced_hookexec
    return outcome.get_result()
           ^^^^^^^^^^^^^^^^^^^^
  File "<lab_env_path>/lib/python3.11/site-packages/pluggy/_result.py", line 99, in get_result
    raise exc.with_traceback(exc.__traceback__)
  File "<lab_env_path>/lib/python3.11/site-packages/pluggy/_result.py", line 61, in from_call
    result = func()
             ^^^^^^
  File "<lab_env_path>/lib/python3.11/site-packages/pluggy/_manager.py", line 470, in <lambda>
    lambda: oldcall(hook_name, hook_impls, caller_kwargs, firstresult)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<lab_env_path>/lib/python3.11/site-packages/pluggy/_callers.py", line 138, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "<lab_env_path>/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    res = hook_impl.function(*args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<lab_env_path>/lib/python3.11/site-packages/pylsp/plugins/hover.py", line 14, in pylsp_hover
    definitions = document.jedi_script(use_document_path=True).infer(**code_position)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<lab_env_path>/lib/python3.11/site-packages/pylsp/workspace.py", line 33, in wrapper
    return method(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<lab_env_path>/lib/python3.11/site-packages/pylsp/workspace.py", line 534, in jedi_script
    self.get_enviroment(environment_path, env_vars=env_vars)
  File "<lab_env_path>/lib/python3.11/site-packages/pylsp/workspace.py", line 566, in get_enviroment
    environment = jedi.api.environment.create_environment(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<lab_env_path>/lib/python3.11/site-packages/jedi/api/environment.py", line 367, in create_environment
    return Environment(_get_executable_path(path, safe=safe), env_vars=env_vars)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<lab_env_path>/lib/python3.11/site-packages/jedi/api/environment.py", line 380, in _get_executable_path
    raise InvalidPythonEnvironment("%s seems to be missing." % python)
jedi.api.environment.InvalidPythonEnvironment: <work_env_path>/bin/python seems to be missing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant