denosaurs / denosaurs/deno_python

Cannot use pip module.

Open
#72 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
762
Forks
26
PR merge metrics
No merged PRs in 30d

Description

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())

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.