我刚刚安装了Python 3.3(x64)和PyWin32,然后执行了以下操作(mindeningyen-env
是virtualenv的目录,mindeningyen
是应用程序的名称):
distribute_setup.py
easy_install virtualenv
virtualenv --no-site-packages mindeningyen-env
cd mindeningyen-env
Scripts\activate
easy_install pyramid
pcreate -s alchemy mindeningyen
cd mindeningyen
setup.py develop
pip install waitress
然后我得到以下描述:
(mindeningyen-env) D:\prg\mindeningyen-env\mindeningyen>pserve development.ini
Traceback (most recent call last):
File "d:\prg\mindeningyen-env\Scripts\pserve-script.py", line 9, in <module>
load_entry_point('pyramid==1.4', 'console_scripts', 'pserve')()
File "d:\prg\mindeningyen-env\lib\site-packages\pyramid-1.4-py3.3.egg\pyramid\scripts\pserve.py", line 50, in main
return command.run()
File "d:\prg\mindeningyen-env\lib\site-packages\pyramid-1.4-py3.3.egg\pyramid\scripts\pserve.py", line 304, in run
global_conf=vars)
File "d:\prg\mindeningyen-env\lib\site-packages\pyramid-1.4-py3.3.egg\pyramid\scripts\pserve.py", line 328, in loadapp
return loadapp(app_spec, name=name, relative_to=relative_to, **kw)
File "d:\prg\mindeningyen-env\lib\site-packages\pastedeploy-1.5.0-py3.3.egg\paste\deploy\loadwsgi.py", line 247, in loadapp
return loadobj(APP, uri, name=name, **kw)
File "d:\prg\mindeningyen-env\lib\site-packages\pastedeploy-1.5.0-py3.3.egg\paste\deploy\loadwsgi.py", line 271, in loadobj
global_conf=global_conf)
File "d:\prg\mindeningyen-env\lib\site-packages\pastedeploy-1.5.0-py3.3.egg\paste\deploy\loadwsgi.py", line 296, in loadcontext
global_conf=global_conf)
File "d:\prg\mindeningyen-env\lib\site-packages\pastedeploy-1.5.0-py3.3.egg\paste\deploy\loadwsgi.py", line 320, in _loadconfig
return loader.get_context(object_type, name, global_conf)
File "d:\prg\mindeningyen-env\lib\site-packages\pastedeploy-1.5.0-py3.3.egg\paste\deploy\loadwsgi.py", line 454, in get_context
section)
File "d:\prg\mindeningyen-env\lib\site-packages\pastedeploy-1.5.0-py3.3.egg\paste\deploy\loadwsgi.py", line 476, in _context_from_use
object_type, name=use, global_conf=global_conf)
File "d:\prg\mindeningyen-env\lib\site-packages\pastedeploy-1.5.0-py3.3.egg\paste\deploy\loadwsgi.py", line 406, in get_context
global_conf=global_conf)
File "d:\prg\mindeningyen-env\lib\site-packages\pastedeploy-1.5.0-py3.3.egg\paste\deploy\loadwsgi.py", line 296, in loadcontext
global_conf=global_conf)
File "d:\prg\mindeningyen-env\lib\site-packages\pastedeploy-1.5.0-py3.3.egg\paste\deploy\loadwsgi.py", line 328, in _loadegg
return loader.get_context(object_type, name, global_conf)
File "d:\prg\mindeningyen-env\lib\site-packages\pastedeploy-1.5.0-py3.3.egg\paste\deploy\loadwsgi.py", line 620, in get_context
object_type, name=name)
File "d:\prg\mindeningyen-env\lib\site-packages\pastedeploy-1.5.0-py3.3.egg\paste\deploy\loadwsgi.py", line 640, in find_egg_entry_point
pkg_resources.require(self.spec)
File "d:\prg\mindeningyen-env\lib\site-packages\distribute-0.6.31-py3.3.egg\pkg_resources.py", line 706, in require
needed = self.resolve(parse_requirements(requirements))
File "d:\prg\mindeningyen-env\lib\site-packages\distribute-0.6.31-py3.3.egg\pkg_resources.py", line 604, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: mindeningyen
为什么找不到该项目的任何想法?
答案 0 :(得分:3)
使用新的Python 3.3 native virtual env实现,我可以在Python 3.3上使用Pyramid:
python3.3 -m venv mindeningyen-env
cd mindeningyen-env/
source bin/activate
curl -O http://python-distribute.org/distribute_setup.py
python distribute_setup.py
bin/easy_install pyramid
bin/pcreate -s alchemy mindeningyen
cd mindeningyen
python setup.py develop
cd ..
bin/pserve mindeningyen/development.ini
答案 1 :(得分:2)
如果使用virtualenv(安装或python内置),不应该说像
setup.py develop
,因为那将使用python解释器,它位于注册表中。应该确保virtualenv被激活Scripts\activate
,之后每个python运行应该使用python,所以,正确的形式是:
python setup.py develop