Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
1aceb017
Commit
1aceb017
authored
Jul 17, 2018
by
Mark Daoust
Browse files
Robust "PYTHONPATH" usage.
parent
1056788e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
samples/core/tutorials/estimators/linear.ipynb
samples/core/tutorials/estimators/linear.ipynb
+7
-4
No files found.
samples/core/tutorials/estimators/linear.ipynb
View file @
1aceb017
...
@@ -165,8 +165,8 @@
...
@@ -165,8 +165,8 @@
},
},
"cell_type": "code",
"cell_type": "code",
"source": [
"source": [
"! pip install requests\n",
"! pip install requests\n",
"! git clone --depth 1 https://github.com/tensorflow/models"
"! git clone --depth 1 https://github.com/tensorflow/models"
],
],
"execution_count": 0,
"execution_count": 0,
"outputs": []
"outputs": []
...
@@ -247,7 +247,10 @@
...
@@ -247,7 +247,10 @@
"#export PYTHONPATH=${PYTHONPATH}:\"$(pwd)/models\"\n",
"#export PYTHONPATH=${PYTHONPATH}:\"$(pwd)/models\"\n",
"#running from python you need to set the `os.environ` or the subprocess will not see the directory.\n",
"#running from python you need to set the `os.environ` or the subprocess will not see the directory.\n",
"\n",
"\n",
"os.environ['PYTHONPATH'] += os.pathsep + models_path"
"if \"PYTHONPATH\" in os.environ:\n",
" os.environ['PYTHONPATH'] += os.pathsep + models_path\n",
"else:\n",
" os.environ['PYTHONPATH'] = models_path"
],
],
"execution_count": 0,
"execution_count": 0,
"outputs": []
"outputs": []
...
@@ -1394,4 +1397,4 @@
...
@@ -1394,4 +1397,4 @@
]
]
}
}
]
]
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment