Skip to content

Commit 0c87e71

Browse files
author
minjk-bl
committed
Fix FactorAnalysis not to install its package by default
1 parent f1757d2 commit 0c87e71

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

visualpython/js/m_stats/FactorAnalysis.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,21 +160,19 @@ define([
160160
}
161161

162162
generateInstallCode() {
163-
return [ '!pip install factor-analyzer'];
163+
let installCode = '!pip install factor-analyzer';
164+
// Add installation code
165+
if (vpConfig.extensionType === 'lite') {
166+
installCode = '%pip install factor-analyzer';
167+
}
168+
return [ installCode ];
164169
}
165170

166171
generateCode() {
167172
let { data, variable, rotation, method, impute, extract, eigenvalue, factor, corrMatrix, screePlot } = this.state;
168173
let codeList = [];
169174
let code = new com_String();
170175

171-
// Add installation code FIXME:
172-
if (vpConfig.extensionType === 'lite') {
173-
codeList.push('%pip install factor-analyzer');
174-
} else {
175-
codeList.push('!pip install factor-analyzer');
176-
}
177-
178176
// data declaration
179177
code.appendFormat("vp_df = {0}", data);
180178
if (this.columnSelector) {

0 commit comments

Comments
 (0)