denosaurs / denosaurs/deno_python

Cannot use pip module.

Offen
#72 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
TypeScript
Sterne
762
Forks
27
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Ive tried using the following example:
```js
import { pip } from "https://deno.land/x/python/ext/pip.ts";

const np = await pip.import("numpy");
const plt = await pip.import("matplotlib", "matplotlib.pyplot");

const xpoints = np.array([1, 8]);
const ypoints = np.array([3, 10]);

plt.plot(xpoints, ypoints);
plt.show();
```

and in the terminal i get:
```
(bunpytest) ➜ bunpytest deno run -A --unstable-ffi index.js
Installing numpy
WARNING: Target directory /Users/neevjewalkar/Library/Caches/deno/plug/pip/numpy already exists. Specify --upgrade to force replacement.
WARNING: Target directory /Users/neevjewalkar/Library/Caches/deno/plug/pip/numpy-2.1.2.dist-info already exists. Specify --upgrade to force replacement.
WARNING: Target directory /Users/neevjewalkar/Library/Caches/deno/plug/pip/bin already exists. Specify --upgrade to force replacement.
error: Uncaught (in promise) PythonError: 0 File "", line 229, in run_module
File "", line 88, in _run_code
File "/opt/homebrew/Cellar/python@3.12/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/__main__.py", line 24, in
sys.exit(_main())

```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Reproduziere das Beispiel in index.js mit `deno run -A --unstable-ffi` unter Verwendung des `pip`-Einstiegspunkts aus https://deno.land/x/python/ext/pip.ts. Verfolge den gemeldeten PythonError aus pip's `__main__.py`; die Aufgabe ist abgeschlossen, wenn das Beispiel numpy und matplotlib ohne den gezeigten Fehler importieren kann.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
deno, javascript, matplotlib, numpy, python
Bereich
backend
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.