我在Windows上使用带有python 2.7的Anaconda,我想安装tensorflow,但是当我尝试安装它时:
conda install tensorflow
我收到错误消息:
Solving environment: -Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Users\nesri\Anaconda2\lib\threading.py", line 801, in __bootstrap_inner
self.run()
File "C:\Users\nesri\Anaconda2\lib\threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "C:\Users\nesri\Anaconda2\lib\site-packages\conda\common\io.py", line 342, in _start_spinning
self.fh.write('\b' * self._indicator_length)
File "C:\Users\nesri\Anaconda2\lib\site-packages\colorama\ansitowin32.py", line 40, in write
self.__convertor.write(text)
File "C:\Users\nesri\Anaconda2\lib\site-packages\colorama\ansitowin32.py", line 141, in write
self.write_and_convert(text)
File "C:\Users\nesri\Anaconda2\lib\site-packages\colorama\ansitowin32.py", line 169, in write_and_convert
self.write_plain_text(text, cursor, len(text))
File "C:\Users\nesri\Anaconda2\lib\site-packages\colorama\ansitowin32.py", line 174, in write_plain_text
self.wrapped.write(text[start:end])
IOError: [Errno 0] Error
failed
UnsatisfiableError: The following specifications were found to be in conflict:
- ipaddress
- tensorflow
Use "conda info <package>" to see the dependencies for each package.
那我该怎么办?
答案 0 :(得分:0)
您应该专门为运行tensorflow创建一个新环境。
conda create --name tf python=2.7 jupyter tensorflow
创建过程需要一些时间,但在安装之后,您可以使用
激活新环境activate tf
答案 1 :(得分:0)
运行此命令
conda create -n tfpy27 -c conda-forge python=2 tensorflow
或参考此问题。 https://github.com/conda-forge/tensorflow-feedstock/issues/37