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

Installing siuba into a venv keeps that Positron interpreter from starting #5411

Open
juliasilge opened this issue Nov 19, 2024 · 5 comments
Labels
area: runtimes Issues related to Language Runtimes bug Something isn't working lang: python
Milestone

Comments

@juliasilge
Copy link
Contributor

System details:

Positron and OS details:

Positron Version: 2024.12.0 (Universal) build 41
Code - OSS Version: 1.93.0
Commit: 39536c2
Date: 2024-11-18T02:47:29.611Z
Electron: 30.4.0
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: 12.4.254.20-electron.0
OS: Darwin arm64 24.0.0

Interpreter details:

So far I have mostly been trying this with pyenv and 3.10, 3.11, and 3.12.

Describe the issue:

If I install siuba into a venv, then I cannot start that venv in Positron. I see the "HTTP request failed" error:

Image

If I take a previously existing venv and I additionally install siuba into it, then that venv no longer can start in Positron and it is busted.

Steps to reproduce the issue:

  1. Take a currently existing venv and activate it
  2. pip install siuba
  3. Try to choose this venv in Positron
  4. Be sad 😭

Expected or desired behavior:

The venv should start in Positron. Do we have incompatible requirements?

Were there any error messages in the UI, Output panel, or Developer Tools console?

The "HTTP request failed" error is in the Extension Host channel. Also I see "Starting language runtime failed. Reason: HTTP request failed" in the Developer Tools.

@juliasilge juliasilge added bug Something isn't working lang: python area: runtimes Issues related to Language Runtimes labels Nov 19, 2024
@ntluong95
Copy link

Not only siuba I think. I have the same problem HTTP request failed sometimes when working with .venv in the newest version

@juliasilge
Copy link
Contributor Author

@ntluong95 Do you have any examples or steps that cause it to happen for you?

@ntluong95
Copy link

I don't have time to make a reproducible example but here is what I have
Image

My pyproject.toml
Image

It is always unreliable to let Positron start Python in my computer (Windows), the alternative Ctrl + Shift + p -> Select Python interpreter works more stable for me. The UI usually doesn't help

@juliasilge
Copy link
Contributor Author

With a new build I got more info:

Positron Version: 2024.12.0 (Universal) build 88
Code - OSS Version: 1.93.0
Commit: 54cbc06
Date: 2024-11-27T02:47:26.609Z
Electron: 30.4.0
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: 12.4.254.20-electron.0
OS: Darwin arm64 24.0.0

Python 3.10.13 (Venv: .venv) starting.
Python 3.10.13 (Venv: .venv) failed to start up (exit code 1)

The process exited abnormally (exit status: 1)
Traceback (most recent call last):
  File "/Applications/Positron.app/Contents/Resources/app/extensions/positron-python/python_files/positron/positron_language_server.py", line 13, in <module>
    from positron_ipykernel.positron_ipkernel import (
  File "/Applications/Positron.app/Contents/Resources/app/extensions/positron-python/python_files/positron/positron_ipykernel/positron_ipkernel.py", line 31, in <module>
    from .access_keys import encode_access_key
  File "/Applications/Positron.app/Contents/Resources/app/extensions/positron-python/python_files/positron/positron_ipykernel/access_keys.py", line 9, in <module>
    from .inspectors import INSPECTOR_CLASSES, PositronInspector, get_inspector
  File "/Applications/Positron.app/Contents/Resources/app/extensions/positron-python/python_files/positron/positron_ipykernel/inspectors.py", line 44, in <module>
    from .third_party import np_, pd_, torch_
  File "/Applications/Positron.app/Contents/Resources/app/extensions/positron-python/python_files/positron/positron_ipykernel/third_party.py", line 64, in <module>
    pd_ = _get_pandas()
  File "/Applications/Positron.app/Contents/Resources/app/extensions/positron-python/python_files/positron/positron_ipykernel/third_party.py", line 22, in _get_pandas
    import pandas
  File "/Users/juliasilge/Work/posit/python-testing-envs/siuba-testing/.venv/lib/python3.10/site-packages/pandas/__init__.py", line 22, in <module>
    from pandas.compat import is_numpy_dev as _is_numpy_dev  # pyright: ignore # noqa:F401
  File "/Users/juliasilge/Work/posit/python-testing-envs/siuba-testing/.venv/lib/python3.10/site-packages/pandas/compat/__init__.py", line 25, in <module>
    from pandas.compat.numpy import (
  File "/Users/juliasilge/Work/posit/python-testing-envs/siuba-testing/.venv/lib/python3.10/site-packages/pandas/compat/numpy/__init__.py", line 4, in <module>
    from pandas.util.version import Version
  File "/Users/juliasilge/Work/posit/python-testing-envs/siuba-testing/.venv/lib/python3.10/site-packages/pandas/util/__init__.py", line 2, in <module>
    from pandas.util._decorators import (  # noqa:F401
  File "/Users/juliasilge/Work/posit/python-testing-envs/siuba-testing/.venv/lib/python3.10/site-packages/pandas/util/_decorators.py", line 14, in <module>
    from pandas._libs.properties import cache_readonly
  File "/Users/juliasilge/Work/posit/python-testing-envs/siuba-testing/.venv/lib/python3.10/site-packages/pandas/_libs/__init__.py", line 13, in <module>
    from pandas._libs.interval import Interval
  File "pandas/_libs/interval.pyx", line 1, in init pandas._libs.interval
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Is it the version of numpy?

@ntluong95
Copy link

I think the siuba project has been deactivated for a while, and it didn't keep update with pandas arrow backend anymore

@juliasilge juliasilge added this to the Future milestone Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: runtimes Issues related to Language Runtimes bug Something isn't working lang: python
Projects
None yet
Development

No branches or pull requests

2 participants