Preface: I started looking at Python two days ago so not a lot of experience. However, all the tutorials I came across emphasized the usage of virtualenv, so of course I went along.
Fast forward to now and I have a Python .py that does what I want it to do -- lets call it test.py
1)Makes a connection to a remote SQL server (had to use pyodbc)
2)I execute some queries and utilize the data the way I want to
3)I send some results out to a serial port (had to use pyserial)
pyodbc and pyserial were installed with pip in the virtualenv.
Now, to run test.py I have to be in this virtual environment, instead of just being able to execute 'python test.py' from anywhere on the command line.
In all the tutorials I came across, as well as other quick google searches of virtualenv usage, I never grasped how the .py was supposed to be utilized in conjunction with the virtualenv that contain these dependencies (pyodbc and pyserial).
(**Probably worth mentioning that I am working in a Windows environment**)
Ultimately, I want to launch my test.py file from a batch file dictated by the TaskScheduler.
Fast forward to now and I have a Python .py that does what I want it to do -- lets call it test.py
1)Makes a connection to a remote SQL server (had to use pyodbc)
2)I execute some queries and utilize the data the way I want to
3)I send some results out to a serial port (had to use pyserial)
pyodbc and pyserial were installed with pip in the virtualenv.
Now, to run test.py I have to be in this virtual environment, instead of just being able to execute 'python test.py' from anywhere on the command line.
In all the tutorials I came across, as well as other quick google searches of virtualenv usage, I never grasped how the .py was supposed to be utilized in conjunction with the virtualenv that contain these dependencies (pyodbc and pyserial).
(**Probably worth mentioning that I am working in a Windows environment**)
Ultimately, I want to launch my test.py file from a batch file dictated by the TaskScheduler.