deno_python icon indicating copy to clipboard operation
deno_python copied to clipboard

Warnings when running pip.import more than once

Open sergeysolovev opened this issue 9 months ago • 1 comments

import { pip } from 'https://deno.land/x/[email protected]/ext/pip.ts';
await pip.import('numpy');

Second and consecutive runs of this code give me the following warnings:

WARNING: Target directory /Users/admin/Library/Caches/deno/plug/pip/numpy already exists. Specify --upgrade to force replacement.
WARNING: Target directory /Users/admin/Library/Caches/deno/plug/pip/numpy-1.26.0.dist-info already exists. Specify --upgrade to force replacement.
WARNING: Target directory /Users/admin/Library/Caches/deno/plug/pip/bin already exists. Specify --upgrade to force replacement.

My version of deno is 1.37.1

sergeysolovev avatar Sep 29 '23 06:09 sergeysolovev

This is an issue with how we plug into pips cache and how it will try to install already installed packages anyways. I am not knowledgeable enough with pip to really know if there is a better way or a solution to this. If there is a solution it is the same in the console but I am unaware of any flag which solves this.

eliassjogreen avatar Oct 03 '23 10:10 eliassjogreen