python & anaconda & django instal

python pip 更改国内镜像源

    1. 以如下方式临时使用:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple scipy==0.13.3
  • 2.永久修改
    创建 vim ~/.pip/pip.conf
http://mirrors.aliyun.com/pypi/simple/
[global]
index-url = http://pypi.douban.com/simple
[install]
trusted-host=pypi.douban.com
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com

1. install anaconda

https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/

ref: https://www.jianshu.com/p/edaa744ea47d

  • config:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
  • 显示安装的频道
 conda config --set show_channel_urls yes 
  • 查看已经添加的channels
conda config --get channels
  • 已添加的channel在哪里查看
vim ~/.condarc

2. django

https://docs.djangoproject.com/en/3.1/intro/install/

Installing an official release with pip

ref: https://docs.djangoproject.com/en/3.1/topics/install/#installing-development-version

python -m pip install Django
Installing the development version

ref: https://docs.djangoproject.com/en/3.1/topics/install/#installing-development-version

  1. Make sure that you have Git installed and that you can run its commands from a shell. (Enter git help at a shell prompt to test this.)

  2. Check out Django’s main development branch like so:

$ git clone https://github.com/django/django.git

This will create a directory django in your current directory.

3.Make sure that the Python interpreter can load Django’s code. The most convenient way to do this is to use a virtual environment and pip. The contributing tutorial walks through how to create a virtual environment.

4.After setting up and activating the virtual environment, run the following command:

$ python -m pip install -e django/

This will make Django’s code importable, and will also make the django-admin utility command available. In other words, you’re all set!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值