2

I'm using Windows.

I successfully ran the following command in command prompt:

C:\projects\quick_tutorial\env\Scripts\cc_starter>pserve development.ini --reload

The pserve application can be found in at least 2 locations on my machine:

  1. C:\projects\quick_tutorial\env\Scripts
  2. C:\Python34\Scripts

Questions:

  1. I ran pserve from a folder that doesn't contain the pserve application. How is it determined which pserve should start the development.ini file?
  2. How is it determined which Python module / environment should be used to run my "cc_starter" project? I'm confused, because I read here: Where should virtualenvs be created? that it doesn't matter where virtual environments are created; so is it the location of the pserve application that determines the virtual environment used to run my project? or a command line within one of the files in my "cc_starter" project?

For reference, I'm following the Quick Tutorial for Pyramid

Community
  • 1
  • 1
Wronski
  • 1,022
  • 2
  • 12
  • 26
  • If you are using PowerShell, it looks like you can use "get-command pserve" to locate the application you used, like "which" command on Linux & Mac. http://stackoverflow.com/a/27140194/2644759 – Philip Tzou Feb 08 '17 at 00:20
  • Thank you. I used: `\env\Scripts\cc_starter>where pserve` and only 1 location was returned: `C:\Python34\Scripts\pserve.exe`. I assume this means when I run pserve from the `\cc_starter location`, that it doesn't run the `pserve` app contained in the env directory. **Question:** Do I need to add `C:\projects\quick_tutorial\env` to my system variables to ensure that my project application and other apps like `pserve` run from within my virtual environment? – Wronski Feb 08 '17 at 01:35
  • Well if you are using virtualenv you need to [`activate`](http://pymote.readthedocs.io/en/latest/install/windows_virtualenv.html#pymote-virtual-environment) it. – Philip Tzou Feb 08 '17 at 04:15

0 Answers0