【发布时间】:2019-09-08 02:35:54
【问题描述】:
我创建了名为 bitcoin_notifications.py 的 virtualenv,我将激活它,但是:
PS C:\Users\piotr> bitcoin_notifications\activate.ps1
bitcoin_notifications\activate.ps1 :
The module 'bitcoin_notifications' could not be loaded. For more information, run 'Import-Module bitcoin_notifications'.At line:1 char:1 + bitcoin_notifications\activate.ps1 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (bitcoin_notifications\activate.ps1:String) [], CommandNotFoundException + FullyQualifiedErrorId : CouldNotAutoLoadModule
在我们读取之前共享的结果中,模块无法加载,如果需要更多信息来运行另一个特定命令。
一旦我运行它,
PS C:\Users\piotr> ```Import-Module bitcoin_notifications
Import-Module : 指定的模块 'bitcoin_notifications' 不是 加载,因为在任何模块中都找不到有效的模块文件 目录。
At line:1 char:1 + Import-Module bitcoin_notifications + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ResourceUnavailable: (bitcoin_notifications:String) [Import-Module], FileNotFoundException + FullyQualifiedErrorId :Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand```
我们可以理解该目录中没有模块。我只想激活virtualenv,怎么办?
【问题讨论】:
-
错误信息表示找不到
bitcoin_notifications模块。模块是否安装正确? -
老实说,我是在复制创建新venv的方法:1.
pip install virtualenv2.mkdir Environments3.cd !$4.virtualenv bitcoin_notifications5.bitcoin_notifications\activate.ps1
标签: python powershell virtualenv python-venv