@@ -148,7 +148,7 @@ define([
148
148
var pipName = that . packageLib [ key ] . pipName ;
149
149
var code = com_util . formatString ( "!pip uninstall -y {0}" , pipName ) ;
150
150
if ( vpConfig . extensionType === 'lite' ) {
151
- code = com_util . formatString ( "import piplite\npiplite. uninstall(' {0}') " , pipName ) ;
151
+ code = com_util . formatString ( "%pip uninstall {0}" , pipName ) ;
152
152
}
153
153
// create block and run it
154
154
$ ( '#vp_wrapper' ) . trigger ( {
@@ -162,7 +162,7 @@ define([
162
162
var pipName = that . packageLib [ key ] . pipName ;
163
163
var code = com_util . formatString ( "!pip install --upgrade {0}" , pipName ) ;
164
164
if ( vpConfig . extensionType === 'lite' ) {
165
- code = com_util . formatString ( "%pip install --upgrade {0}" , pipName ) ;
165
+ code = com_util . formatString ( "%pip install {0}" , pipName ) ;
166
166
}
167
167
// create block and run it
168
168
$ ( '#vp_wrapper' ) . trigger ( {
@@ -269,15 +269,15 @@ define([
269
269
var pipName = this . packageLib [ this . state . selected ] . pipName ;
270
270
var code = com_util . formatString ( "!pip install {0}" , pipName ) ;
271
271
if ( vpConfig . extensionType === 'lite' ) {
272
- code = com_util . formatString ( "import piplite\npiplite. install(' {0}') " , pipName ) ;
272
+ code = com_util . formatString ( "%pip install {0}" , pipName ) ;
273
273
}
274
274
if ( versionType === 'specified' ) {
275
275
// specified version
276
276
let version = $ ( this . wrapSelector ( '.vp-inner-popup-version' ) ) . val ( ) ;
277
277
if ( version && version !== '' ) {
278
278
code = com_util . formatString ( "!pip install {0}=={1}" , pipName , version ) ;
279
279
if ( vpConfig . extensionType === 'lite' ) {
280
- code = com_util . formatString ( "import piplite\npiplite. install(' {0}=={1}') " , pipName , version ) ;
280
+ code = com_util . formatString ( "%pip install {0}=={1}" , pipName , version ) ;
281
281
}
282
282
} else {
283
283
$ ( this . wrapSelector ( '.vp-inner-popup-version' ) ) . focus ( ) ;
0 commit comments