简体   繁体   中英

ImportError: cannot import name 'path' from 'django'

I am trying to learn django/make my first web app with the platform.

I am trying to set up my first url page, but the path import won't work (Import Error). The import code I used (which is pretty straightforward...)

from django import path

I am using a virtual environment venv, and have python v 3.10 and django 4.0.5.

Any pointers? The only info I could find on this is from 4 years ago, and the issue was a older version of django, which does not seem to be the case here.

它应该从urls包中导入:

from django.urls import path

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM