无法激活virtualenv环境 - tensorflow

Joy*_* Li 6 python virtualenv tensorflow

我正在尝试安装tensorflow.我使用pip3成功下载了tensorflow.但当我尝试通过以下方式激活环境时:

source ~/tensorflow/bin/activate 
Run Code Online (Sandbox Code Playgroud)
我的提示不会改变.

当我尝试:

source ~/tensorflow/bin/activate.csh
Run Code Online (Sandbox Code Playgroud)

它说:

-bash: alias: deactivate: not found
-bash: alias: `test $?_OLD_VIRTUAL_PATH !': invalid alias name
-bash: setenv: command not found
-bash: setenv: command not found
-bash: /Users/bingyaoli/tensorflow/bin/activate.csh: line 37: syntax error: unexpected end of file
Run Code Online (Sandbox Code Playgroud)

小智 7

尝试:

source ~/tensor_flow/bin/activate
Run Code Online (Sandbox Code Playgroud)

[没有 .csh 扩展名],它对我有用。


小智 6

而不是使用

source ~/tensorflow/bin/activate.csh
Run Code Online (Sandbox Code Playgroud)

尝试:

csh ~/tensorflow/bin/activate.csh
Run Code Online (Sandbox Code Playgroud)

这解决了这个问题.