Skip to content

Commit

Permalink
updated installation order to improve version matching
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianPlum committed Nov 20, 2021
1 parent 09e8380 commit 9a801ff
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions check_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,12 @@
subprocess.call([py_exec, "-m", "pip", "install", "--upgrade", "pip"])
# install packages (if they are not already installed)

try:
import tensorflow as tf
except ImportError:
subprocess.call(
[py_exec, "-m", "pip", "install", f"--target={py_exec[:-14]}" + "lib", "tensorflow==2.7.0"])

try:
import scipy
except ImportError:
subprocess.call(
[py_exec, "-m", "pip", "install", f"--target={py_exec[:-14]}" + "lib", "scipy"])

try:
import numpy
except ImportError:
subprocess.call(
[py_exec, "-m", "pip", "install", f"--target={py_exec[:-14]}" + "lib", "numpy"])

try:
import pandas
except ImportError:
Expand All @@ -49,3 +37,9 @@
except ImportError:
subprocess.call(
[py_exec, "-m", "pip", "install", f"--target={py_exec[:-14]}" + "lib", "scikit-learn"])

try:
import tensorflow as tf
except ImportError:
subprocess.call(
[py_exec, "-m", "pip", "install", f"--target={py_exec[:-14]}" + "lib", "tensorflow==2.7.0"])

0 comments on commit 9a801ff

Please sign in to comment.