如何在Windows 10上安装Django

3
我正在使用Anaconda解释器,您能告诉我如何在不同于C盘的驱动器中创建Conda环境并安装Django吗?
谢谢。

https://www.codingforentrepreneurs.com/blog/install-python-django-on-windows/ - fool-dev
1个回答

0
你可以使用 conda create 中的 -p--prefix 参数将环境保存到特定位置。
conda create -p D:/path/to/my/env django

这里唯一的区别是,环境不会在anaconda提供的列表中,并且必须使用其路径显式激活。

例如,在OS X上看起来像这样:

conda create -p ~/Desktop/test -y -q django


Package plan for installation in environment /Users/grr/Desktop/test:

The following NEW packages will be INSTALLED:

    ca-certificates: 2017.08.26-ha1e5d58_0
    certifi:         2018.1.18-py36_0
    django:          1.11.8-py36hd476221_0
    libcxx:          4.0.1-h579ed51_0
    libcxxabi:       4.0.1-hebd6815_0
    libedit:         3.1-hb4e282d_0
    libffi:          3.2.1-h475c297_4
    ncurses:         6.0-hd04f020_2
    openssl:         1.0.2n-hdbc3d79_0
    pip:             9.0.1-py36h1555ced_4
    python:          3.6.4-hc167b69_1
    pytz:            2017.3-py36hf0bf824_0
    readline:        7.0-hc1231fa_4
    setuptools:      38.4.0-py36_0
    sqlite:          3.21.0-h3efe00b_0
    tk:              8.6.7-h35a86e2_3
    wheel:           0.30.0-py36h5eb2c71_1
    xz:              5.2.3-h0278029_2
    zlib:            1.2.11-hf3cbc9b_2

# conda environments:
#
Tensorflow               /Users/grr/anaconda/envs/Tensorflow
cbc                      /Users/grr/anaconda/envs/cbc
py27                     /Users/grr/anaconda/envs/py27
py35                     /Users/grr/anaconda/envs/py35
root                  *  /Users/grr/anaconda

source activate ~/Desktop/test
(/Users/grr/Desktop/test) Diouf: grr ~ $

在Windows上,您只需在激活期间省略source即可。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接