Last change
on this file since 34384 was 34379, checked in by davidb, 4 years ago |
Some further refinement of what to print out, after some initial testing
|
File size:
1.1 KB
|
Rev | Line | |
---|
[34371] | 1 |
|
---|
[34377] | 2 | # Symlink this file so it is in the top-level Greenstone3 directory area
|
---|
[34371] | 3 |
|
---|
| 4 | source ./gs3-setup.sh
|
---|
| 5 |
|
---|
[34379] | 6 | function check_pip_installed()
|
---|
| 7 | {
|
---|
| 8 | if [ ! -d "$GEXT_MARS_INSTALLED/virtualenv-python3/lib/python3.7/site-packages/$1" ] \
|
---|
| 9 | && [ ! -f "$GEXT_MARS_INSTALLED/virtualenv-python3/lib/python3.7/site-packages/$1.py" ] ; then
|
---|
| 10 | echo "!!!!" >&2
|
---|
| 11 | echo "! Failed to find directory or file: " >&2
|
---|
| 12 | echo "! $GEXT_MARS_INSTALLED/virtualenv-python3/lib/python3.7/site-packages/$1(.py)" >&2
|
---|
| 13 | echo "!!!!" >&2
|
---|
| 14 | echo "! You need to: " >&2
|
---|
| 15 | if [ "x$VIRTUAL_ENV" = "x" ] ; then
|
---|
| 16 | echo "! source $GEXT_MARS/darwin/virtualenv-python3/bin/activate" >&2
|
---|
| 17 | echo "! Then: " >&2
|
---|
| 18 | fi
|
---|
| 19 | echo "! pip install $1" >&2
|
---|
| 20 | echo "!!!!" >&2
|
---|
| 21 |
|
---|
| 22 | return 1
|
---|
| 23 | fi
|
---|
| 24 | }
|
---|
| 25 |
|
---|
| 26 | function check_pip_installed_all()
|
---|
| 27 | {
|
---|
| 28 | for pkg in six sklearn matplotlib ; do
|
---|
| 29 | check_pip_installed $pkg
|
---|
| 30 | if [ $? != 0 ] ; then
|
---|
| 31 | return 1
|
---|
| 32 | fi
|
---|
| 33 | done
|
---|
| 34 | }
|
---|
| 35 |
|
---|
| 36 |
|
---|
| 37 | check_pip_installed_all
|
---|
| 38 |
|
---|
| 39 | if [ $? != 0 ] ; then
|
---|
| 40 | return 1
|
---|
[34371] | 41 | fi
|
---|
| 42 |
|
---|
[34379] | 43 | if [ "x$VIRTUAL_ENV" = "x" ] ; then
|
---|
[34371] | 44 |
|
---|
[34379] | 45 | echo ""
|
---|
| 46 | echo "****"
|
---|
| 47 | echo "* Activating Python v3 Virtual Env "
|
---|
| 48 | echo "****"
|
---|
| 49 | echo ""
|
---|
[34371] | 50 |
|
---|
[34379] | 51 | source $GEXT_MARS_INSTALLED/virtualenv-python3/bin/activate
|
---|
| 52 | fi
|
---|
| 53 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.