安装 miniconda Python 2.7

安装 miniconda Python 2.7

我正在尝试在 ubuntu 12.04 上安装minicondaPython 2.7。我已经写了这个:

if ! [ -f ~/.bash_profile ]; then touch ~/.bash_profile; fi
if ! [ -f ~/.bashrc ]; then touch ~/.bashrc; fi
if ! grep -q "source ~/.bashrc" ~/.bash_profile; then echo 'if [ -f    ~/.bashrc ]; then source ~/.bashrc; fi' >> ~/.bash_profile; fi

然后我使用:

bash Miniconda-*.sh 

但进程开始了,却从未结束。我不知道如何解决这个问题。

答案1

在终端中使用以下简单步骤:

cd

对于 64 位:

wget -c http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh

对于 32 位

wget -c http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86.sh

我现在将讨论 64 位版本。

chmod +x Miniconda-latest-Linux-x86_64.sh
./Miniconda-latest-Linux-x86_64.sh

您必须执行以下步骤:

Welcome to Miniconda 3.10.1 (by Continuum Analytics, Inc.)

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>> 

Enter

阅读许可证(或不阅读;))和

Q

然后输入yes

Do you approve the license terms? [yes|no]
[no] >>> yes

接受路径或输入新路径

Miniconda will now be installed into this location:
/home/<your_username>/miniconda

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/home/<your_username>/miniconda] >>>

Enter

PREFIX=/home/<your_username>/miniconda
installing: python-2.7.9-3 ...
installing: conda-env-2.1.4-py27_0 ...
installing: openssl-1.0.1k-1 ...
installing: pycosat-0.6.1-py27_0 ...
installing: pyyaml-3.11-py27_0 ...
installing: readline-6.2-2 ...
installing: requests-2.6.0-py27_0 ...
installing: sqlite-3.8.4.1-1 ...
installing: system-5.8-2 ...
installing: tk-8.5.18-0 ...
installing: yaml-0.1.4-0 ...
installing: zlib-1.2.8-0 ...
installing: conda-3.10.1-py27_0 ...
Python 2.7.9 :: Continuum Analytics, Inc.
creating default environment...
installation finished.
Do you wish the installer to prepend the Miniconda install location
to PATH in your /home/<your_username>/.bashrc ? [yes|no]
[no] >>>

类型yes

Prepending PATH=/home/<your_username>/miniconda/bin to PATH in /home/<your_username>/.bashrc
A backup will be made to: /home/<your_username>/.bashrc-miniconda.bak


For this change to become active, you have to open a new terminal.

Thank you for installing Miniconda!

就这样。

关闭终端并重新启动或source /home/<your_username>/.bashrc

启动conda后你会看到类似这样的内容:

$ conda
usage: conda [-h] [-V] command ...

conda is a tool for managing and deploying applications, environments and
packages.

positional arguments:

[...]

现在您可以开始安装numpy

conda install numpy

相关内容