@@ -73,7 +73,7 @@ cd "/usr" || exit 1
73
73
74
74
linux_install_pre () {
75
75
sudo apt-get update
76
- sudo apt-get install --no-install-recommends --no-install-suggests -y apt-utils curl git cmake build-essential
76
+ sudo apt-get install --no-install-recommends --no-install-suggests -y apt-utils curl git cmake build-essential python3-dev python3-venv
77
77
exit_on_error $?
78
78
}
79
79
@@ -103,6 +103,11 @@ linux_install_bittensor() {
103
103
ohai " Cloning bittensor@master into ~/.bittensor/bittensor"
104
104
mkdir -p ~ /.bittensor/bittensor
105
105
git clone https://github.com/opentensor/bittensor.git ~ /.bittensor/bittensor/ 2> /dev/null || (cd ~ /.bittensor/bittensor/ ; git fetch origin master ; git checkout master ; git pull --ff-only ; git reset --hard ; git clean -xdf)
106
+
107
+ ohai " Creating Python virtual environment"
108
+ python3 -m venv ~ /.bittensor/venv
109
+ source ~ /.bittensor/venv/bin/activate
110
+
106
111
ohai " Installing bittensor"
107
112
$python -m pip install -e ~ /.bittensor/bittensor/
108
113
$python -m pip install -U bittensor-cli
@@ -166,6 +171,11 @@ mac_update_pip() {
166
171
mac_install_bittensor () {
167
172
ohai " Cloning bittensor into ~/.bittensor/bittensor"
168
173
git clone https://github.com/opentensor/bittensor.git ~ /.bittensor/bittensor/ 2> /dev/null || (cd ~ /.bittensor/bittensor/ ; git fetch origin master ; git checkout master ; git pull --ff-only ; git reset --hard; git clean -xdf)
174
+
175
+ ohai " Creating Python virtual environment"
176
+ python3 -m venv ~ /.bittensor/venv
177
+ source ~ /.bittensor/venv/bin/activate
178
+
169
179
ohai " Installing bittensor"
170
180
$python -m pip install -e ~ /.bittensor/bittensor/
171
181
$python -m pip install -U bittensor-cli
@@ -178,7 +188,7 @@ OS="$(uname)"
178
188
if [[ " $OS " == " Linux" ]]; then
179
189
180
190
which -s apt-get
181
- if [[ $? = = 0 ]] ; then
191
+ if [[ $? ! = 0 ]] ; then
182
192
abort " This linux based install requires apt-get. To run with other distros (centos, arch, etc), you will need to manually install the requirements"
183
193
fi
184
194
echo " " "
0 commit comments