尝试在我的Ubuntu上安装djnago,但我没有这样做。我猜这是由于我在Ubunutu上安装了python 2/7和python 3:
pip3 install django
Traceback (most recent call last):
File "/usr/local/bin/pip3", line 5, in <module>
from pkg_resources import load_entry_point
File "/home/itaybz/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3126, in <module>
@_call_aside
File "/home/itaybz/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3110, in _call_aside
f(*args, **kwargs)
File "/home/itaybz/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3139, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/home/itaybz/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
return cls._build_from_requirements(__requires__)
File "/home/itaybz/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 596, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/home/itaybz/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 784, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pip==9.0.1' distribution was not found and is required by the application
以下内容已安装在ubunuto上:
itaybz@itaybz-ub-pc:/usr/local/bin$ python
Python 2.7.12 (default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
itaybz@itaybz-ub-pc:/usr/local/bin$ python3
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.