我正在尝试安装Tensorflow 1.2.0或更高版本,因此我可以访问'feature_column'。
我尝试了很多东西来尝试更新它,但是没有成功。
我正在使用:
Mac OS X El Capitan V10.11.5
Anaconda 1.7.0版
python version 3.6.4
pip版本9.0.1
以下是我尝试的一些方法:
pip3 install --upgrade tensorflow
Failed to import the site module
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py", line 544, in <module>
main()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py", line 530, in main
known_paths = addusersitepackages(known_paths)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py", line 282, in addusersitepackages
user_site = getusersitepackages()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py", line 258, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py", line 248, in getuserbase
USER_BASE = get_config_var('userbase')
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/sysconfig.py", line 601, in get_config_var
return get_config_vars().get(name)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/sysconfig.py", line 550, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/sysconfig.py", line 421, in _init_posix
_temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
ModuleNotFoundError: No module named '_sysconfigdata_x86_64_apple_darwin13_4_0'
当失败时我尝试了这个:
conda install -c conda-forge tensorflow
However, this only gave me the option to install Tensorflow version 1.1.0
是否有理由不让我安装1.2.0或更高版本?
答案 0 :(得分:0)
我找到了解决方案:
conda install -c conda-forge google-api-python-client
允许Anaconda找到tensorflow的最新版本
然后升级tensorflow,我不得不首先将html5lib降级到版本0.9999999
答案 1 :(得分:0)
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.6.0-py3-none-any.whl