2017-02-24 57 views
1

我試圖運行這個特定的行,但我得到一個錯誤。 我使用命令提示符,然後我安裝的python路徑當我檢查窗戶上python.exePython 3.5 - venv無效語法

>>>python3 -m venv tutorial-env 
    File "<stdin>", line 1 
    python3 -m venv tutorial-env 
       ^
SyntaxError: invalid syntax 

回答

1

這個命令應該是run from your OS-level shell安裝到路徑選項,而不是從Python的:

$ python3 -m venv tutorial-env 

或在Windows上:

C:\> python3 -m venv tutorial-env 
+0

它說「python3」不被識別爲一個內部或外部命令,可操作 程序或批處理文件...? –

+0

@BHok,你是否[把Python添加到你的'%PATH%'](https://docs.python.org/3/using/windows.html#configuring-python)(或讓安裝程序爲你做) ? – Chris

+0

我讓安裝程序爲我做。 –