Error Traceback most recent call last File stdin line 1 in ImportError cannot import name path

0 votes

Tried to run command:

from django.urls import path

Getting error:

Traceback (most recent call last): File "< stdin >", line 1, in ImportError: cannot import name 'path']

Any help??

Aug 5, 2020 in Python by kartik
• 37,530 points
1,818 views

1 answer to this question.

0 votes

Hello @kartik,

You need Django version 2

pip install --upgrade django
pip3 install --upgrade django

python -m django --version # 2.0.2
python3 -m django --version # 2.0.2

Hope it helps!!

Thank You!!

answered Aug 5, 2020 by Niroj
• 82,820 points

Related Questions In Python

0 votes
1 answer

ImportError Traceback (most recent call last) ImportError: numpy.core.umath failed to import

Hi@akhtar, You need to upgrade your Numpy library. Your ...READ MORE

answered Jun 22, 2020 in Python by MD
• 95,300 points
946 views
0 votes
1 answer

Exception in Tkinter callback Traceback (most recent call last):

Hello, @R, As per the Beautiful Soup Documentation: AttributeError: 'NoneType' ...READ MORE

answered Dec 21, 2020 in Python by Gitika
• 65,950 points
4,590 views
0 votes
1 answer

How to resolve ImportError: cannot import name 'add' in python ?

There's no module called "add" in random. ...READ MORE

answered Feb 12, 2019 in Python by Mark
2,955 views
0 votes
1 answer

How to temporarily disable a foreign key constraint in MySQL?

Hello @kartik, To turn off foreign key constraint ...READ MORE

answered Jun 23, 2020 in Python by Niroj
• 82,820 points
926 views
0 votes
1 answer

How do I use Django templates without the rest of Django?

Hello @kartik, Let's say you have this important ...READ MORE

answered Jun 23, 2020 in Python by Niroj
• 82,820 points
418 views
0 votes
1 answer

Error:after upgrading pip: cannot import name 'main'

Hello @kartik, You must have inadvertently upgraded your ...READ MORE

answered Jun 5, 2020 in Python by Niroj
• 82,820 points
835 views