D
Deno

help

deno_python

Aanggoran8/3/2023
I'm trying to use Python with Deno with https://deno.land/x/python@0.2.7 What should I do to enable import Python 3rd party module, should I create Python venv?
IioB8/3/2023
@load1n9
Lload1n98/3/2023
if you install the 3rd party extension to the used python version it should work
Aanggoran8/3/2023
Is it like running a venv inside the Deno project?
Lload1n98/3/2023
nope its bindings to your installed python version
Aanggoran8/3/2023
Oh so I need to install say, pandas globally?
Lload1n98/3/2023
yep
Aanggoran8/3/2023
I see, thank youu
Rrajsite8/6/2023
Another thing to try could be using python via pyodide. With deno's npm and --node-modules-dir support I found you can leverage pyodide and the libraries compiled for it (the example there shows numpy): https://github.com/pyodide/pyodide/issues/3420#issuecomment-1542742906
GitHub
Deno support · Issue #3420 · pyodide/pyodide
Deno support was discussed in #1477 (comment) and I think it would be good to add it and have some minimal tests in CI. As discussed in the linked PR only a few minor fixes are needed. I'll ope...
IioB8/6/2023
deno_python supports all python modules because it just talks to the interpreter, I feel like these are different use cases for sure
Rrajsite8/6/2023
Seems like the use case is pretty similar, leverage some python libraries and code in a deno app, but the tradeoffs in implementation are different, python that runs inside the deno sandbox as webassembly vs global / system installed python. There is a fair number of libraries available in pyodide but true that it's not everything available on a system: https://pyodide.org/en/stable/usage/packages-in-pyodide.html
IioB8/6/2023
fair enough
Eeliassjogreen8/6/2023
There is a PR I made for installing and importing pip packages for deno_python too! https://github.com/denosaurs/deno_python/pull/43 I realized I need to fix some name normalization which I have on my other computer so you will have to wait a little longer but it uses the same environment as python so if sys.path in python contains the venv lib path it uses venv. (my pr does some magic and adds a deno path to the sys.path)
IioB8/6/2023
thanks for the update eliass

Looking for more? Join the community!

Recommended Posts
Deno VS Code plugin too aggressive in auto-completionI'm new to Deno and learning through some tutorials. I'm using VS Code and have the Deno plugin enabhow to exit all async command in deno task?consider this code ```json { "tasks": { "dev-server": "deno run --watch --allow-read --allow-nnode-pre-gyp install failing inside docker containerI'm building something that depends on a library with a native component (pulsar-client) and it doesSet a cookie in GET and retrieve in POSTbeen tryinig to do this for a couple hours now. Basically I want a way to return the user to the prWhat are newUserProps()I'm reading saaskit source, and I don't understand the point of `newUserProps()`. Why not just definRun a detached child process in DenoI'm looking at running a detached child process using Deno. Specifically I want run something like adeno info returns module not found``` deno info https://raw.githubusercontent.com/Murcul/norm/v1.3.0/src/mod.ts error: module could nocan't scrub video```<div className={"flex flex-col text-primary w-full lg:w-1/2 justify-center"}> <video classNamProper usage of `Deno.HttpClient`Hi! I'm creating an application which allows the internal use of HTTP proxies for certain tasks. In What's a good way to write tests for a script which does a bunch filesystem wrangling?As per the title - I have a script which, given a folder, does a bunch of moving and renaming. I'd lHow to access request body in Deno?Thank you.Syntax error when getting prop children Element but compilesIs this error important? How can I fix it? Should I fix it?Generate jUnit XML file from Deno TestsHey is it possible that the Deno Test suite generates a jUnit XML about the Test? So that I can dispHow to do callbacks with `deno_core`?Hello! I've been inspired to write an application after reading this article: https://deno.com/blog/How to ignore ts error when bundling?I run ``` deno bundle '.main.ts' fibery.js ``` and it refuses to work due to 41 errors. Mostly theyStreaming FormDataI have `Deno.serve` a HTML page with `<form enctype="multipart/form-data">` with a `file` input. IAstro - Vs code templateI am deploying this app using the deno deploy. My app's root is available at https://antilibrary-asdenodrivers/sqlite and deno-sqlit behave different with multiple `?` argsI wanted to understand why these return different results ```ts Deno.test("DB()", (_) => { // Want to write a small NPM package that's for all contextsdeno, browser and node is this April 2022 resource the best one for this? https://portal.gitnation.oSite runs fine but vscode is filled with errors.Kinda annoying, any ideas why?