OSError:[Errno 45]不支持操作:' / home / samuelchin' - 苹果电脑

时间:2016-07-25 12:52:44

标签: python python-2.7 tensorflow


我正在尝试运行此代码:https://github.com/jkschin/svhn ..
当我运行svn_train.py时出现此错误

Traceback (most recent call last):   File "svhn_train.py", line 93, in
<module>
    tf.app.run()   File "/Users/n/anaconda/lib/python2.7/site-packages/tensorflow/python/platform/app.py",
line 30, in run
    sys.exit(main(sys.argv))   File "svhn_train.py", line 88, in main
    gfile.MakeDirs(FLAGS.train_dir)   File "/Users/n/anaconda/lib/python2.7/site-packages/tensorflow/python/platform/gfile.py",
line 295, in MakeDirs
    os.makedirs(path, mode)   File "/Users/n/anaconda/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)    File "/Users/n/anaconda/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)   File "/Users/n/anaconda/lib/python2.7/os.py", line 150, in makedirs

   makedirs(head, mode)   File "/Users/aljaafn/anaconda/lib/python2.7/os.py", line 157, in makedirs

   mkdir(name, mode) OSError: [Errno 45] Operation not supported: '/home/samuelchin'

代码内置于Python&amp; Tensorflow在SVHN数据上运行和训练模型。

任何想法?提前致谢

1 个答案:

答案 0 :(得分:0)

https://github.com/jkschin/svhn/blob/master/svhn_flags.py#L7硬编码作者的本地主目录,这绝对不是可移植的。就像README所说的那样,你需要能够破解代码才能使代码工作。