如何在virtualenv python 2.7中安装Django

时间:2016-02-11 14:35:35

标签: python django ubuntu pip virtualenv

请告诉我一些方法在virtualenv中在ubuntu中安装Django而不使用pip for python 2.7 我正在使用代理连接。我已经尝试了为pip导出代理的其他答案中显示的步骤。

当我尝试pip install Django==1.6.2时,它显示错误

Downloading/unpacking Django
  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement Django
Cleaning up...
No distributions at all found for Django
Storing debug log for failure in /home/shivam/.pip/pip.log

另外,我无法使用pip安装任何内容。

1 个答案:

答案 0 :(得分:1)

如果你使用pip 1.5.4,你应该阅读这个主题:pip connection failure: cannot fetch index base URL http://pypi.python.org/simple/。所以,你应该在你的virtualenv中升级pip:describe('MUT', () => { let MUT; beforeEach((done) => { // remove the previous version System.delete(System.normalizeSync('./Mut')) // re-import the module System.import('./Mut').then((imported) => { MUT = imported }).then(done, fail) }) it('should do stuff, () => { MUT.value = 'foo' expect(MUT.value).toBe('foo') }) it('should do more stuff', () => { expect(MUT.value).not.toBe('foo') }) }) (见https://pip.pypa.io/en/stable/installing/#upgrading-pip)。