Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

没有urls模块 #5

Open
kkdetong opened this issue Jan 31, 2018 · 9 comments
Open

没有urls模块 #5

kkdetong opened this issue Jan 31, 2018 · 9 comments

Comments

@kkdetong
Copy link

ImportError at /
No module named urls
Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 1.8.13
Exception Type: ImportError
Exception Value:
No module named urls
Exception Location: /home/python/.virtualenvs/py2/local/lib/python2.7/site-packages/rest_framework/compat.py in , line 26
Python Executable: /home/python/.virtualenvs/py2/bin/python
Python Version: 2.7.11
Python Path:
['/home/python/movieweb_python/movieweb',
'/home/python/movieweb_python/movieweb',
'/home/python/movieweb_python/movieweb/videoplay',
'/home/python/movieweb_python/movieweb/movieweb',
'/home/python/movieweb_python',
'/home/python/.virtualenvs/py2/lib/python2.7',
'/home/python/.virtualenvs/py2/lib/python2.7/plat-x86_64-linux-gnu',
'/home/python/.virtualenvs/py2/lib/python2.7/lib-tk',
'/home/python/.virtualenvs/py2/lib/python2.7/lib-old',
'/home/python/.virtualenvs/py2/lib/python2.7/lib-dynload',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-x86_64-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/home/python/.virtualenvs/py2/local/lib/python2.7/site-packages',
'/home/python/.virtualenvs/py2/lib/python2.7/site-packages']
Server time: 星期三, 31 一月 2018 08:22:52 +0000

@eli95
Copy link

eli95 commented Jan 31, 2018

image

@hanyucd
Copy link
Owner

hanyucd commented Jan 31, 2018

@kkdetong @eli95 解决了说下。
可以试下修改 urls.py 文件:
1。
default

改为:

default

2。
default

改为:

default

@eli95
Copy link

eli95 commented Feb 1, 2018

image

@kkdetong
Copy link
Author

kkdetong commented Feb 5, 2018

@eli95 按照作者的修改还是报错吗?

@kkdetong
Copy link
Author

kkdetong commented Feb 5, 2018

@hanyucd 还是报错同样的错误

@dl942702882
Copy link

确实报错,按照作者修改了 也不行 是不是django的版本问题?

@hanyucd
Copy link
Owner

hanyucd commented Mar 7, 2018

@dl942702882 也有可能是 Django 版本问题,我安装的 django Version 是 1.8.13,python Version 是 2.7 你试着换下我这版本看看。

@chadspring
Copy link

django Version 1.8.13, python Version 2.7 同样报错

File "/Users/wuchungang/Library/Python/2.7/lib/python/site-packages/rest_framework/viewsets.py", line 25, in <module>
    from django.urls import NoReverseMatch
ImportError: No module named urls

@n0thing2speak
Copy link

pip2 install djangorestframework==3.5.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants
@hanyucd @chadspring @n0thing2speak @eli95 @dl942702882 @kkdetong and others