이 문제점을 검색 했으므로이 문제를 언급 한 특정 해결책이 없습니다.Python-pyramid가 로컬 호스트를 실행하지 않습니다.
python pyramid를 설치하고 실행하려고합니다.
anaconda
을 설치하고 가상 환경을 만들고 pip install "pyramid==1.7.3"
을 사용하여 피라미드를 설치했습니다.
`from wsgiref.simple_server import make_server
from pyramid.config import Configurator
from pyramid.response import Response
def hello_world(request):
return Response('Hello %(name)s!' % request.matchdict)
if __name__ == '__main__':
config = Configurator()
config.add_route('hello', '/hello/{name}')
config.add_view(hello_world, route_name='hello')
app = config.make_wsgi_app()
server = make_server('0.0.0.0', 8080, app)
server.serve_forever()`
이 helloworld.py
localhost:8080
을 열면
404 Not Found The resource could not be found.
오류가 발생합니다. 여기
내가 여기 실종 무엇 Command Prompt
입니까?
누군가 통지하지 않은 경우, 나는 초보자입니다.
서버가 시작 않았고 실행 중입니다. "localhost : 8080/hello/john"을 사용해보십시오 –
그렇습니다. "http : // localhost : 8080/hello/world"에 게재됩니다. – user6923096