tensorflow: TypeError: run() got an unexpected keyword argument 'argv'

When I followed the TensorFlow Mechanics 101 tutorial python fully_connected_feed.py in examples/tutorials/mnist directory, I came across this problem:

Traceback (most recent call last):
  File "fully_connected_feed.py", line 277, in <module>
    tf.app.run(main=main, argv=[sys.argv[0]] + unparsed)
TypeError: run() got an unexpected keyword argument 'argv'

I am using tensorflow 0.11 version in Anaconda environment.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 30 (3 by maintainers)

Most upvoted comments

Prior to 1.0, always make sure the tensorflow example code you run is from the same branch as the binary version you have installed.

So your options are:

  1. Upgrade your tensorflow installation (via nightly or source built from the same master branch) to use files in the master branch
  2. Check out the copy of the example code from the branch you have installed (For example: r0.11 if you have 0.11 installed, r0.10 if you have 0.10 installed).

Mixing and matching source code and binary install will likely cause you pain.

@loretoparisi branche Select the branch match you tensorflow version and download it, run the file in the directory you download.

Thanks a lot, i git the r0.11 banch eventually, and it works !

Please Dude, read the topic:

git clone https://github.com/tensorflow/tensorflow -b r0.11

Thanks, i try “-b r0.11” with Git clone and it works

Thx a lot every one, it works!

I got it and it works,thanks!

@loretoparisi I recompiled my code using r0.12 but it now gives another error ‘run() got an unexpected keyword argument argv’

screenshot from 2016-11-23 19-45-47

Use “-b r0.11” with Git clone!