一开始没有用管理员
pip install tensorflow 一大片红错误
pip install tensorflow==2.0 这个制定了版本,进行了好久,但是最后提示
Command "D:\Anaconda3\envs\tensorflow\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Zsy\\AppData\\Local\\Temp\\pip-install-il5qpm4i\\grpcio\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Zsy\AppData\Local\Temp\pip-record-ny4xm2jj\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Zsy\AppData\Local\Temp\pip-install-il5qpm4i\grpcio\
You are using pip version 10.0.1, however version 20.3.4 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
我就安照这个命令输入,第一次进行到23%失败,仍然提示这个,第二次成功
ERROR: Command errored out with exit status 1: 'd:\anaconda3\envs\tensorflow\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Zsy\\AppData\\Local\\Temp\\pip-install-nejezs4g\\grpcio_243d139eb91148f0ad388abf3783ff01\\setup.py'"'"'; __file__='"'"'C:\\Users\\Zsy\\AppData\\Local\\Temp\\pip-install-nejezs4g\\grpcio_243d139eb91148f0ad388abf3783ff01\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Zsy\AppData\Local\Temp\pip-record-1ur8w296\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\anaconda3\envs\tensorflow\Include\grpcio' Check the logs for full command output.
最后用的这个
pip install tensorflow -i https://pypi.douban.com/simple --user
好了,成了