gpt4 book ai didi

python-3.x - Pyramid 在 Python 3.3 下安装给出 pkg_resources.DistributionNotFound : under Windows

转载 作者:行者123 更新时间:2023-12-02 22:18:37 27 4
gpt4 key购买 nike

我刚刚安装了 Python 3.3 (x64) 和 PyWin32,然后做了以下操作(mindeningyen-env 是虚拟环境的目录,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

为什么找不到项目有什么想法吗?

最佳答案

使用新的 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

关于python-3.x - Pyramid 在 Python 3.3 下安装给出 pkg_resources.DistributionNotFound : <myproject> under Windows,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14091176/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com