Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.

Remove tensorflow and CloudML SDK from setup.py #144

Merged
merged 3 commits into from
Feb 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion datalab/kernel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,21 @@
import datalab.bigquery.commands
import datalab.context.commands
import datalab.data.commands
import datalab.mlalpha.commands
import datalab.stackdriver.commands
import datalab.storage.commands
import datalab.utils.commands

# mlalpha modules require TensorFlow, CloudML SDK, and DataFlow (installed with CloudML SDK).
# These are big dependencies and users who want to use Bigquery/Storage features may not
# want to install them.
# This __init__.py file is called when Jupyter/Datalab loads magics on startup. We don't want
# Jupyter+pydatalab fail to start because of missing TensorFlow/DataFlow. So we ignore import
# errors on mlalpha commands.
try:
import datalab.mlalpha.commands
except:
print('TensorFlow and CloudML SDK are required.')


_orig_request = _httplib2.Http.request
_orig_init = _requests.Session.__init__
Expand Down
21 changes: 0 additions & 21 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,24 +109,3 @@
]
}
)

# for python2 only, install tensorflow and cloudml
if sys.version_info[0] == 2:
tensorflow_path = None
if platform.system() == 'Darwin':
tensorflow_path = 'https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.11.0-py2-none-any.whl'
elif platform.system() == 'Linux':
if platform.linux_distribution()[0] == 'Ubuntu':
tensorflow_path = 'https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0-cp27-none-linux_x86_64.whl'
elif platform.linux_distribution()[0] == 'Debian':
tensorflow_path = 'https://storage.googleapis.com/tensorflow/linux/cpu/debian/jessie/tensorflow-0.11.0-cp27-none-linux_x86_64.whl'

# install tensorflow
if not tensorflow_path:
print("""Warning: could not find tensorflow build for your OS.
Please go to https://www.tensorflow.org/get_started/os_setup to see install options""")
else:
pip.main(['install', tensorflow_path])

# install cloud ml sdk
pip.main(['install', 'https://storage.googleapis.com/cloud-ml/sdk/cloudml.latest.tar.gz'])