我是python环境的新手。尝试从此code获取book以便在Windows 8.1上运行。
在一堆找不到模块的问题(如ssl和numnpy)并尝试使用不同版本的python之后,我得到了conda 4.5.12和Python 3.7.1。已安装。我必须将mkl _ *。dll移至d:\ Anaconda3 \ Library \ bin并将d:\ Anaconda3 \ Library \ bin添加到要通过此problem获取并导入numpy的路径。不确定这样做是否破坏了任何东西。
有什么方法可以在Windows 8.1上进行全新安装,以便numpy正常工作?
尝试安装tensorflow会得到:
D:\ray\dev\conradapps\dlgopy\dlatgog\code>conda install tensorflow
Solving environment: failed
UnsatisfiableError: The following specifications were found to be in conflict:
- anaconda==2018.12=py37_0 -> bleach==3.0.2=py37_0
- anaconda==2018.12=py37_0 -> numexpr==2.6.8=py37hdce8814_0
- anaconda==2018.12=py37_0 -> scikit-learn==0.20.1=py37h343c172_0
- tensorflow
我该怎么做才能安装tensorflow?
编辑:尝试this中的一些内容。
获得一些警告:
done
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(89): Could not remo
ve or rename d:\Anaconda3\DLLs\_bz2.pyd.c~. Please remove this file manually (y
ou may need to reboot to free file handles)
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(89): Could not remo
ve or rename d:\Anaconda3\DLLs\_lzma.pyd.c~. Please remove this file manually (
you may need to reboot to free file handles)
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(89): Could not remo
ve or rename d:\Anaconda3\DLLs\_queue.pyd.c~. Please remove this file manually
(you may need to reboot to free file handles)
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(89): Could not remo
ve or rename d:\Anaconda3\DLLs\_socket.pyd.c~. Please remove this file manually
(you may need to reboot to free file handles)
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(89): Could not remo
ve or rename d:\Anaconda3\DLLs\select.pyd.c~. Please remove this file manually
(you may need to reboot to free file handles)
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(89): Could not remo
ve or rename d:\Anaconda3\DLLs\unicodedata.pyd.c~. Please remove this file manu
ally (you may need to reboot to free file handles)
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(89): Could not remo
ve or rename d:\Anaconda3\python.exe.c~. Please remove this file manually (you
may need to reboot to free file handles)
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(89): Could not remo
ve or rename d:\Anaconda3\python3.dll.c~. Please remove this file manually (you
may need to reboot to free file handles)
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(89): Could not remo
ve or rename d:\Anaconda3\python37.dll.c~. Please remove this file manually (yo
u may need to reboot to free file handles)
文件可以轻松删除,而无需重新启动。现在我可以导入tensorflow了。
接下来尝试喀拉拉邦。
keras正在导入!
答案 0 :(得分:0)
easy 解决方案:
1)卸载Anaconda-它的名称类似于“ Python 3.7.1(Anaconda3 2018.12 64位)”。
2)重新安装Anaconda,但这一次是在安装过程中打勾,以将Python添加到您的PATH。
3)Tensorflow和numpy应该开箱即用,无需其他安装。例如,在我的终端上,我可以运行:
C:\Users\vasil>python
Python 3.7.1 (default, Dec 10 2018, 22:54:23) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> np
<module 'numpy' from 'C:\\Users\\vasil\\Anaconda3\\lib\\site-packages\\numpy\\__init__.py'>
>>> np.absolute(-1)
1