无法在Ubuntu Server 16.04上安装Django 2 Beta 1 [英] Cannot install Django 2 Beta 1 on Ubuntu Server 16.04

查看:84
本文介绍了无法在Ubuntu Server 16.04上安装Django 2 Beta 1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Django下载页面上显示的命令行在Ubuntu Server 16.04上安装Django 2 beta 1,但没有成功.

I'm trying to install Django 2 beta 1 on an Ubuntu Server 16.04 using the command line shown on Django's download page without success.

给定的命令行是:pip install --pre django,但是当我运行它时,它正在尝试安装Django 1.11.6. (Downloading Django-1.11.6-py2.py3-none-any.whl (6.9MB))

The given command line is: pip install --pre django but when I run it, it is trying to install Django 1.11.6. (Downloading Django-1.11.6-py2.py3-none-any.whl (6.9MB))

有人知道我如何成功安装Beta吗?

Does anyone know how I can successfully install the beta ?

推荐答案

我找到了一个解决方案:我卸载了我拥有的每个Python版本(2.7、3.5、3.6)以及Pip.

I found a solution: I uninstalled every version of Python I had (2.7, 3.5, 3.6) as well as Pip.

然后仅安装Python 3.5,并通过Curl检索的python脚本安装Pip(必须这样做,否则apt会与Pip一起安装Python 2.7),并使用以下命令:

Then installed only Python 3.5 and installed Pip via a python script retrieved by Curl (had to do this way otherwise apt was installing Python 2.7 along with Pip) with these commands:

curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python3 get-pip.py

最后,我使用原始命令安装了Django 2 beta1:

Finally, I installed the Django 2 beta1 with the original command:

pip install --pre Django

这篇关于无法在Ubuntu Server 16.04上安装Django 2 Beta 1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆