1

I seem to be unable to run my Sublime Text 3 build with any virtual environment. My latest attempt has been to use the Virtualenv package in sublime text and use the following project settings:

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

    "virutalenv": "C:\\Users\\alexa\\Envs\\test5",
    "settings": "C:\\Users\\alexa\\Envs\\test5\\Scripts\\python" 
}

My desired venv has pandas installed:

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>

But when I run my build, which is set to Python + Virtualenv, I get the following:

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;]
Alex McLean
  • 2,524
  • 5
  • 30
  • 53
  • There isn't much indication that your build is running from the virtual environment you've made. – pvg Jun 09 '17 at 02:00
  • @pvg I agree; so how do I do this better? – Alex McLean Jun 09 '17 at 02:09
  • where are you setting these 'python virtualenv' settings? One thing you can try as a test is launching sublime from your activated venv. But for it to work independently, sublime has to be aware of and activate your specific venv which seems to be what's missing here. – pvg Jun 09 '17 at 02:16

1 Answers1

0

Have you checked out this question? It seems pretty similar, and has some helpful responses. Also, try pip freeze within your virtual environment to see if pandas is installed in your virtual environment.

Python modules not found in virtualenv

rdurrani
  • 111
  • 1
  • 6