I am completing the Quick Tutorial for Pyramid which is written for a Linux system and I am using Windows, so I convert each command to a Windows equivalent.
In Tutorial Step: Quick Project Startup with Cookiecutters I run into the following issues:
Command written in the Tutorial: i.e. for linux
$VENV/bin/pip install cookiecutter
What I do in Windows:
I activate the virtual environment with:
c:\projects\quick_tutorial\env\Scripts\Activate
Then I use the Windows command:
(env) c:\projects\quick_tutorial\env\Scripts\pip install cookiecutter
Similarly, I then run the following command:
(env) c:\projects\quick_tutorial\env\Scripts\cookiecutter https://github.com/Pylons/pyramid-cookiecutter-starter
The above command places a new folder: cc_starter inside my "...env\Scripts" folder. I assume this doesn't make sense, so I move cc_starter into c:\projects\quick_tutorial
.
At this point my directory looks like: My Director, which: (1) doesn't contain a "bin" folder; and (2) doesn't have the "cc_starter" folder inside the "env" folder. <-- I assume these are the 2 main differences between how this project with virtual environment should be structured differently between Linux and Windows
The Problem:
The final part of this tutorial step is to run:
$ env/bin/pserve development.ini --reload
^^ for Linux
My Windows equivalent:
(env) c:\projects\quick_tutorial\cc_starter\pserve development.ini --reload
This unfortunately returns the following Traceback (most recent call last):
File "C:\Python34\lib\runpy.py", line 170, in _run_module_as_main
"main", mod_spec) File "C:\Python34\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "c:\projects\quick_tutorial\env\Scripts\pserve.exe__main__.py", line 9, in File
"C:\Python34\Lib\site-packages\pyramid\scripts\pserve.py", line 60,
in main return command.run() File "C:\Python34\Lib\site-packages\pyramid\scripts\pserve.py", line 371,
in run global_conf=vars) File "C:\Python34\Lib\site-packages\pyramid\scripts\pserve.py", line 406,
in loadapp return loadapp(app_spec, name=name, relative_to=relative_to, **kw) File "C:\Python34\Lib\site-packages\paste\deploy\loadwsgi.py", line 247,
in loadapp return loadobj(APP, uri, name=name, **kw) File "C:\Python34\Lib\site-packages\paste\deploy\loadwsgi.py", line 271,
in loadobj global_conf=global_conf) File "C:\Python34\Lib\site-packages\paste\deploy\loadwsgi.py", line 296,
in loadcontext global_conf=global_conf) File "C:\Python34\Lib\site-packages\paste\deploy\loadwsgi.py", line 320,
in _loadconfig return loader.get_context(object_type, name, global_conf) File "C:\Python34\Lib\site-packages\paste\deploy\loadwsgi.py", line 454,
in get_context section) File "C:\Python34\Lib\site-packages\paste\deploy\loadwsgi.py", line 476,
in _context_from_use object_type, name=use, global_conf=global_conf) File "C:\Python34\Lib\site-packages\paste\deploy\loadwsgi.py", line 406,
in get_context global_conf=global_conf) File "C:\Python34\Lib\site-packages\paste\deploy\loadwsgi.py", line 296,
in loadcontext global_conf=global_conf) File "C:\Python34\Lib\site-packages\paste\deploy\loadwsgi.py", line 328,
in _loadegg return loader.get_context(object_type, name, global_conf) File "C:\Python34\Lib\site-packages\paste\deploy\loadwsgi.py", line 620,
in get_context object_type, name=name) File "C:\Python34\Lib\site-packages\paste\deploy\loadwsgi.py", line 640,
in find_egg_entry_point pkg_resources.require(self.spec) File "C:\Python34\Lib\site-packages\pkg_resources.py", line 669, in
require needed = self.resolve(parse_requirements(requirements))
File "C:\Python34\Lib\site-packages\pkg_resources.py", line 572, in
resolve raise DistributionNotFound(req) pkg_resources.DistributionNotFound: cc-starter
(sorry about the block of text, it was copied directly out of command prompt)
Questions:
- Do I need to run the "Activate" command, as I have done, inside the Scripts folder?
- Is
env\Scripts
folder the equivalent ofenv\bin
in Linux ? - Am I meant to move the "cc_starter folder" out of
quick_tutorial\env\Scripts
and place into\quick_tutorial
? (as I have done) - What do I need to do to avoid error when I load
development.ini
?