简体   繁体   English

Tensorflow安装错误消息,“ SyntaxError”?

[英]Tensorflow installation error messages, 'SyntaxError'?

I'd like to install tensorflow using pip in python 3.7 on windows 10 using the command-line as administrator. 我想使用命令行作为管理员在Windows 10上的python 3.7中使用pip安装tensorflow。

First time installing tensorflow and I get error messages: 第一次安装tensorflow并收到错误消息:

(SyntaxError: unexpected character after line continuation character) or (SyntaxError: invalid syntax).

I have tried the various ways shown below: 我尝试了以下所示的各种方法:

# OPENING PYTHON AS ADMINISTRATOR 
C:\WINDOWS\system32>C:\Users\plain\AppData\Local\Programs\Python\Python37-32\python.exe
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

# ATTEMPT 1
C:\> pip3 install --upgrade tensorflow
  File "<stdin>", line 1
    C:\> pip3 install --upgrade tensorflow
                                         ^
SyntaxError: unexpected character after line continuation character

# ATTEMPT 2
C:\> pip install --upgrade tensorflow
  File "<stdin>", line 1
    C:\> pip install --upgrade tensorflow
                                        ^
SyntaxError: unexpected character after line continuation character

# ATTEMPT 3
python -m pip install [tensorflow]
SyntaxError: invalid syntax

# ATTEMPT 4 
C:\WINDOWS\system32>C:\Users\plain\AppData\Local\Programs\Python\Python37-32\> pip3 install --upgrade tensorflow
SyntaxError: unexpected character after line continuation character

# ATTEMPT 5 
C:\WINDOWS\system32>C:\Users\plain\AppData\Local\Programs\Python\Python37-32> pip install --upgrade tensorflow
SyntaxError: unexpected character after line continuation character

Thanks! 谢谢!

python -m pip install tensorflow works well on my windows7 system. python -m pip install tensorflow在我的Windows7系统上运行良好。 I am currently using python3.6 64 bit version. 我目前正在使用python3.6 64位版本。 Before you execute "python -m pip install tensorflow" from commandline, set the "PATH" in environment variable to 'python.exe' 从命令行执行“ python -m pip install tensorflow”之前,请将环境变量中的“ PATH”设置为“ python.exe”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM