-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tf2: Updated setup.py dependencies. (#1002)
* Updated setup.py dependencies. * Allow tf2 baselines pip package setup to work with all tf2 cpu/gpu versions.
- Loading branch information
Showing
1 changed file
with
14 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,10 +12,10 @@ | |
'filelock', | ||
'pytest', | ||
'pytest-forked', | ||
'atari-py' | ||
'atari-py~=0.2.0' | ||
], | ||
'bullet': [ | ||
'pybullet', | ||
'pybullet' | ||
], | ||
'mpi': [ | ||
'mpi4py' | ||
|
@@ -32,8 +32,7 @@ | |
packages=[package for package in find_packages() | ||
if package.startswith('baselines')], | ||
install_requires=[ | ||
'tf-nightly-2.0-preview', | ||
'gym', | ||
'gym<0.14', | ||
'scipy', | ||
'tqdm', | ||
'joblib', | ||
|
@@ -50,3 +49,14 @@ | |
author_email='[email protected]', | ||
version='0.1.5') | ||
|
||
# ensure there is some tensorflow build with version above 2.0 | ||
import pkg_resources | ||
tf_pkg = None | ||
for tf_pkg_name in ['tensorflow', 'tensorflow-gpu', 'tf-nightly', 'tf-nightly-gpu']: | ||
try: | ||
tf_pkg = pkg_resources.get_distribution(tf_pkg_name) | ||
except pkg_resources.DistributionNotFound: | ||
pass | ||
assert tf_pkg is not None, 'TensorFlow needed, of version above 2.0' | ||
from distutils.version import LooseVersion | ||
assert LooseVersion(re.sub(r'-?rc\d+$', '', tf_pkg.version)) >= LooseVersion('2.0.0') |