Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

please get rid of tensorflow 1.7 dependency #1979

Closed
clankill3r opened this issue Apr 24, 2019 · 13 comments
Closed

please get rid of tensorflow 1.7 dependency #1979

clankill3r opened this issue Apr 24, 2019 · 13 comments
Assignees

Comments

@clankill3r
Copy link

With pip3 I get:
Could not find a version that satisfies the requirement tensorflow==1.7 (from versions: 1.13.0rc1, 1.13.0rc2, 1.13.1, 2.0.0a0)

This repository is still such a pain to get the work.

@MarcoMeter
Copy link

Sounds like your are not using Python version 3.6

@harperj harperj self-assigned this Apr 25, 2019
@harperj
Copy link
Contributor

harperj commented Apr 25, 2019

Hi @clankill3r -- I think MarcoMeter is right, at this time you'll need to use Python 3.6 to use ML-Agents. We did look into updating the version of Python / Tensorflow recently and discovered bugs and package version conflicts which haven't yet been resolved.

@clankill3r
Copy link
Author

It was with 3.6.
I figured out that it works using pip install "tensorflow==1.7.0" instead of pip3.
(Using pip instead of pip3 seems to work quite often in general).

We try to get ml-agents working with a small group of students, for most students it works now.
Next school semester ml-agents might be a candidate for a assignment with the students but dependency hell is a big influencer for now.

Atm we do it using the following steps, (we moved from pip to miniconda where possible).

  1. install miniconda https://docs.conda.io/en/latest/miniconda.html
  2. conda install python=3.6
  3. conda create -n py36 python=3.6
  4. source activate py36 (Do this everytime you open the terminal)
  5. pip install "tensorflow==1.7.0"
  6. conda install -c anaconda jupyter
  7. pip install mlagents

navigate to the directory where you want the unity project installed:

git clone https://github.com/Unity-Technologies/ml-agents
cd ml-agents
cd ml-agents-envs
pip install -e ./
cd ..
cd ml-agents
pip install -e ./

As for now, it fails when for example someone had a version of pillow installed before.

It would be really great if the dependencies where just included in the repository in such a way that no additional installations are required.

Also, what is the reason of setup.py? Is it supposed to install dependencies or check for dependencies being installed?

        'mlagents_envs==0.8.1',
        'tensorflow>=1.7,<1.8',
        'Pillow>=4.2.1',
        'matplotlib',
        'numpy>=1.13.3,<=1.14.5',
        'jupyter',
        'pytest>=3.2.2,<4.0.0',
        'docopt',
        'pyyaml',
        'protobuf>=3.6,<3.7',
        'grpcio>=1.11.0,<1.12.0',
        'pypiwin32==223;platform_system=="Windows"'],

Eventually we hope to get a list of commands that just work 99% of the cases.

@shihzy
Copy link
Contributor

shihzy commented May 29, 2019

hi @clankill3r - yes, setup.py is intended to check and install the dependencies. let us know if you or your students continue to have issues. closing out the ticket for now, but feel free to re-open if needed.

@simonbogh
Copy link

Trying to understand what is happening here, because I am experiencing the same.

Clean virtenv with python 3.6.7. I run the following.
pip install mlagents==0.9.3
It will install tensorflow 1.7.1

Hereafter I can install tensorflow 1.12.3 if I want to without any problems.

If I install tensorflow 1.12.x first, and then mlagents, then it will downgrade tensorflow to 1.7.1.

@chriselion
Copy link
Contributor

Hi @simonbogh ,
I think that's just a quirk of how pip handles things. In my experience, sometime mlagents-learn will complain about the versions when you run it, even if you managed to make pip happy.

The good news is that the latest development version of ml-agents relaxes the restrictions on tensorflow (and numpy and python) versions. We're releasing v0.10 this week, which will contain these changes.

@simonbogh
Copy link

Hi @chriselion ,

I am happy to hear that, because it is quite annoying to get your TF package downgraded when installing mlagents. When you say relaxes the restrictions on TF, is it still for a specific version or just any version?

@clankill3r
Copy link
Author

@chriselion That is really great to hear.
Now we might be actually able to use this with students.

@chriselion
Copy link
Contributor

@simonbogh
We currently require tensorflow>=1.7,<2.0
https://github.com/Unity-Technologies/ml-agents/blob/master/ml-agents/setup.py#L43

We're working on supporting tensorflow 2.0.0 now that it's available.

@simonbogh
Copy link

simonbogh commented Oct 3, 2019

@chriselion
And if you install from pip packages which I did? Here it downgraded my TF to 1.7.1 from 1.12.x.

@simonbogh
Copy link

Ok I see, that requirement was changed in 0.10.0, 3 days ago? For 0.9.3 it says
dist=tensorflow<1.8,>=1.7 parent=mlagents==0.9.3

@chriselion
Copy link
Contributor

Yeah, sorry, it was changed on the develop branch a few weeks ago, but the first published package that has the change is 0.10.0.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants