0

我试图在(venv)的我的应用程序中安装 django -rest- auth

pip install django-rest-auth

但我得到这个错误。为什么?注意:** django 和 djangorestframwork 已经安装

pip install django-rest-auth
Collecting django-rest-auth
  Using cached django-rest-auth-0.9.2.tar.gz
Requirement already satisfied: Django>=1.8.0 in ./venv/lib/python3.5/site-packages (from django-rest-auth)
Requirement already satisfied: djangorestframework>=3.1.0 in ./venv/lib/python3.5/site-packages (from django-rest-auth)
Requirement already satisfied: six>=1.9.0 in ./venv/lib/python3.5/site-packages (from django-rest-auth)
Requirement already satisfied: pytz in ./venv/lib/python3.5/site-packages (from Django>=1.8.0->django-rest-auth)
Building wheels for collected packages: django-rest-auth
  Running setup.py bdist_wheel for django-rest-auth ... error
  Complete output from command /home/mohammadreza/PycharmProjects/mohammadrezaDjangoApp/Django/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-xl9ds058/django-rest-auth/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp5sk4s13wpip-wheel- --python-tag cp35:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help

  error: invalid command 'bdist_wheel'

  ----------------------------------------
  Failed building wheel for django-rest-auth
  Running setup.py clean for django-rest-auth
Failed to build django-rest-auth
Installing collected packages: django-rest-auth
  Running setup.py install for django-rest-auth ... done
Successfully installed django-rest-auth-0.9.2
4

1 回答 1

2

只需安装 wheel 包似乎可以解决问题。 pip install wheel,然后pip install django-rest-auth再说一次。

于 2020-07-03T11:49:37.943 回答