Issue with pyramid framework wit Python 3.3 version

二次信任 提交于 2019-12-11 19:52:56

问题


Could you please help me to solve below error while starting my pyramid project ?

c:\Python33\Scripts\v_env_testmvc_cmd\Scripts>activate
(v_env_testmvc_cmd) c:\Python33\Scripts\v_env_testmvc_cmd\Scripts>cd..
(v_env_testmvc_cmd) c:\Python33\Scripts\v_env_testmvc_cmd>cd ..
(v_env_testmvc_cmd) c:\Python33\Scripts>pserve.exe MyProject\development.ini --reload
Traceback (most recent call last): File "c:\Python33\Scripts\pserve-script.py", line 9, in <module>
    load_entry_point('pyramid==1.5a3', 'console_scripts', 'pserve')()
  File "c:\Python33\lib\site-packages\distribute-0.6.49-py3.3.egg\pkg_resources.py", line 345, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "c:\Python33\lib\site-packages\distribute-0.6.49-py3.3.egg\pkg_resources.py", line 2382, in load_entry_point
    return ep.load()
  File "c:\Python33\lib\site-packages\distribute-0.6.49-py3.3.egg\pkg_resources.py", line 2088, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "c:\Python33\lib\site-packages\pyramid-1.5a3-py3.3.egg\pyramid\scripts\pserve.py", line 31, in <module>
    from pyramid.paster import setup_logging
  File "c:\Python33\lib\site-packages\pyramid-1.5a3-py3.3.egg\pyramid\paster.py", line 10, in <module>
    from pyramid.scripting import prepare
  File "c:\Python33\lib\site-packages\pyramid-1.5a3-py3.3.egg\pyramid\scripting.py", line 1, in <module>
    from pyramid.config import global_registries
  File "c:\Python33\lib\site-packages\pyramid-1.5a3-py3.3.egg\pyramid\config\__init__.py", line 9, in <module>
    from webob.exc import WSGIHTTPException as WebobWSGIHTTPException
  File "c:\Python33\lib\site-packages\webob-1.3.1-py3.3.egg\webob\exc.py", line 1134, in <module>
    from paste import httpexceptions
  File "c:\Python33\lib\site-packages\paste-1.7.5.1-py3.3.egg\paste\httpexceptio ns.py", line 77, in <module>
    from paste.wsgilib import catch_errors_app
  File "c:\Python33\lib\site-packages\paste-1.7.5.1-py3.3.egg\paste\wsgilib.py", line 331
    raise exc_info[0], exc_info[1], exc_info[2]
                     ^ SyntaxError: invalid syntax

Could you please help me to solve all this errors ?

File name which has this issue is: C:\Python33\Lib\site-packages\paste-1.7.5.1-py3.3.egg\paste\wsgilib.py


回答1:


Don't use activate. Instead set an environment variable to your virtual environment path and use that when invoking commands. Details are in this setup guide. Alternatively, the master branch of the documentation has the "bleeding edge" for Windows installation of Pyramid that has been thoroughly tested by tutorial and meetup participants.

Once you have done that, then follow the process described in Creating a Pyramid Project.




回答2:


It was documentation issue and was solved . Resolved in latest documennts. Thank you.



来源:https://stackoverflow.com/questions/21242773/issue-with-pyramid-framework-wit-python-3-3-version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!