-1

In other words, how can i build a system using python from virtual environment where i got all my packages installed. Ty in advance!

zoramind
  • 25
  • 1
  • 5
  • Assuming you're running your code from terminal, simply activate your virtual env with the installations and run your code how you normally would. – Ahmet Jun 06 '20 at 17:54
  • did you create any new environment or what? – Ravi Jun 06 '20 at 17:54
  • just c\user\desktop\folder_name\virtualenv_name\scripts\activate.bat p.e – zoramind Jun 06 '20 at 17:56
  • I think there are already plenty of resources available on how to use virtual environments (and using them with Sublime Text), which part of this specific situation is not covered by those? – AMC Jun 06 '20 at 18:43
  • @Joao the top three answers in the duplicate I linked have all three of the methods I would recommend -- adding the path of the Python executable to the project, using the `Virtualenv` package I linked to in my answer, and creating a custom build system. Personally, I would go for the project solution, but the plugin is also a good choice. – MattDMo Jun 06 '20 at 18:48

1 Answers1

0

I haven't used it myself, but it looks like the Virtualenv package in Package Control does exactly what you're looking for. Please read through the README thoroughly, as it explains how the package works and which settings need to be set manually so that it will work.

Essentially, what it's doing under the hood is finding the Python executable in your virtualenv and creating a custom build system with the path to that executable, so the proper modules will be accessible during the build. It claims to work with both venv and virtualenv environments.

MattDMo
  • 100,794
  • 21
  • 241
  • 231
  • I already went to that page but it didnt work. However, this time around, sublimerepl method worked just fine! Ty! – zoramind Jun 06 '20 at 21:43