Fallback to compilation from source if wheel installation fails
This commit is contained in:
Родитель
2a719502f1
Коммит
98c015af99
|
@ -1 +0,0 @@
|
|||
-e git+https://github.com/apple/coremltools@ad3e24d875972cd2242b531e80d99d92ae215dec#egg=coremltools
|
|
@ -1,3 +1,4 @@
|
|||
-e git+https://github.com/apple/coremltools@ad3e24d875972cd2242b531e80d99d92ae215dec#egg=coremltools
|
||||
h5py==2.8.0
|
||||
Keras==2.2.2
|
||||
Keras-Applications==1.0.4
|
||||
|
|
|
@ -96,9 +96,14 @@ export default class ConvertView extends React.Component<{}, IComponentState> {
|
|||
this.setState({ currentStep: Step.InstallingRequirements });
|
||||
const platformRequirements = packagedFile(`requirements-${process.platform}.txt`)
|
||||
if (fs.existsSync(platformRequirements)) {
|
||||
await pip(['install', '-r', platformRequirements], this.outputListener);
|
||||
} else {
|
||||
await pip(['install', '-r', packagedFile(`requirements-other.txt`)], this.outputListener);
|
||||
try {
|
||||
await pip(['install', '-r', platformRequirements], this.outputListener);
|
||||
} catch (e) {
|
||||
// If the installation of any compiled wheel fails (e.g. not compiled for this version of Python),
|
||||
// fallback to compilation from source code through requirements.txt
|
||||
// tslint:disable-next-line:no-console
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
await pip(['install', '-r', packagedFile('requirements.txt')], this.outputListener);
|
||||
this.setState({ currentStep: Step.Idle });
|
||||
|
|
Загрузка…
Ссылка в новой задаче