我刚刚开始在Neo4j图形学院学习《用Python构建Neo4j应用程序》课程。在课程中,我使用python -m venv sandbox
创建了一个名为Sandbox的虚拟环境,但当我想要使用课程中指示的代码source sandbox/bin/activate
激活时,PowerShell控制台显示以下错误:
source : The term 'source' is not recognized as the name of a cmdlet, function, script file.
script or executable program. Check if you spelled the name correctly, or if you included a
path, check that the path is correct and try again.
On line: 1 Character: 1
+ source sandbox/bin/activate
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (source:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
1条答案
按热度按时间gojuced71#
这看起来像是您在Windows上,使用PowerShell,并试图使用用于Unix系统的bash/zsh脚本来激活虚拟环境。
相反,试着跑步
您可以在此处找到完整的文档,其中包含更多细节和需要考虑的事项:https://docs.python.org/3/library/venv.html
一定要好好读一读。