Python 基于Sublime Text 3 for Windows构建虚拟环境

Python 基于Sublime Text 3 for Windows构建虚拟环境,python,windows,sublimetext3,Python,Windows,Sublimetext3,我似乎无法在任何虚拟环境中运行我的Sublime Text 3构建。我最近的尝试是在sublime文本中使用Virtualenv包,并使用以下项目设置: { "folders": [ { "path": "." } ], "virutalenv": "C:\\Users\\alexa\\Envs\\test5", "settings": "C:\\Users\\alexa\\Envs\\test5\\Scripts\\python" } 我想要的venv

我似乎无法在任何虚拟环境中运行我的Sublime Text 3构建。我最近的尝试是在sublime文本中使用
Virtualenv
包,并使用以下项目设置:

{
 "folders":
 [
  {
   "path": "."
  }
 ],

    "virutalenv": "C:\\Users\\alexa\\Envs\\test5",
    "settings": "C:\\Users\\alexa\\Envs\\test5\\Scripts\\python" 
}
我想要的
venv
已安装
pandas

C:\Users\alexa\Envs\test5\Scripts>activate
(test5) C:\Users\alexa\Envs\test5\Scripts>pip install pandas
Requirement already satisfied: pandas in c:\users\alexa\envs\test5\lib\site-packages
Requirement already satisfied: python-dateutil>=2 in c:\users\alexa\envs\test5\lib\site-packages (from pandas)
Requirement already satisfied: numpy>=1.7.0 in c:\users\alexa\envs\test5\lib\site-packages (from pandas)
Requirement already satisfied: pytz>=2011k in c:\users\alexa\envs\test5\lib\site-packages (from pandas)
Requirement already satisfied: six>=1.5 in c:\users\alexa\envs\test5\lib\site-packages (from python-dateutil>=2->pandas)

(test5) C:\Users\alexa\Envs\test5\Scripts>
但是,当我运行我的构建(设置为
Python+Virtualenv
)时,我得到以下结果:

Traceback (most recent call last):
  File "C:\Users\alexa\Desktop\SBP\first.py", line 2, in <module>
    import pandas 
ModuleNotFoundError: No module named 'pandas'
[Finished in 0.4s with exit code 1]
[shell_cmd: python -u "C:\Users\alexa\Desktop\SBP\first.py"]
[dir: C:\Users\alexa\Desktop\SBP]
[path: C:\Program Files\Dell\DW WLAN Card;;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Python35-32;C:\Python35-32\Lib\site-packages\;C:\Python35-32\Scripts\;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;]
回溯(最近一次呼叫最后一次):
文件“C:\Users\alexa\Desktop\SBP\first.py”,第2行,在
进口大熊猫
ModuleNotFoundError:没有名为“pandas”的模块
[完成时间为0.4s,退出代码为1]
[shell\u cmd:python-u“C:\Users\alexa\Desktop\SBP\first.py”]
[dir:C:\Users\alexa\Desktop\SBP]
[路径:C:\Program Files\Dell\DW WLAN卡;C:\Program Files(x86)\Intel\iCLS客户端\;C:\Program Files\Intel\iCLS客户端\;C:\Windows\system32;C:\Windows;C:\Windows\system32\Wbem;C:\Windows\system32\WindowsPowerShell\v1.0\;C:\Program Files(x86)\Intel\Intel(R)管理引擎组件\DAL;C:\Program Files\Intel\Intel(R)管理引擎组件\DAL;C:\Program Files(x86)\Intel\Intel(R)管理引擎组件\IPT;C:\Program Files\Intel\Intel(R)管理引擎组件\IPT;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files(x86)\NVIDIA Corporation\PhysX\Common;%SystemRoot%\system32;%SystemRoot%\system32\Wbem;%SystemRoot%\system32\WindowsPowerShell\v1.0\;C:\Python35-32;C:\Python35-32\Lib\site packages\;C:\Python35-32\Scripts\;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;]

您签出这个问题了吗?这看起来很相似,并且有一些有用的回答。另外,在虚拟环境中尝试pip冻结,以查看虚拟环境中是否安装了pandas


您是否签出了此问题?这看起来很相似,并且有一些有用的回答。另外,在虚拟环境中尝试pip冻结,以查看虚拟环境中是否安装了pandas


没有太多迹象表明您的构建是从您创建的虚拟环境运行的。@pvg我同意;那么我该如何做得更好呢?您在哪里设置这些“python virtualenv”设置?作为测试,您可以尝试从激活的venv启动sublime。但要使其独立工作,sublime必须意识到并激活您的特定venv,这似乎是此处缺少的。没有太多迹象表明您的构建是从您创建的虚拟环境运行的。@pvg我同意;那么我该如何做得更好呢?您在哪里设置这些“python virtualenv”设置?作为测试,您可以尝试从激活的venv启动sublime。但为了使其独立工作,sublime必须意识到并激活您的特定venv,这似乎是此处缺少的。是的,
pandas
显示为
pip freeze
。我认为问题在于如何连接到VirtualEnvironment?在您的环境名称上运行
workon
之后,您是否尝试在python解释器中手动运行脚本?是的,
pandas
显示为
pip freeze
。我认为问题在于如何连接到VirtualEnvironment在您的环境名称上运行
workon
之后,您是否尝试在python解释器中手动运行脚本?