如何在最新版Anancoda 2019.03下安装/更新到sympy 1.4?

时间:2019-04-30 23:43:21

标签: anaconda sympy

更新

感谢下面@cel的提示,使用的命令是

>sudo conda install sympy=1.4

## Package Plan ##
  environment location: /opt/anaconda

  added / updated specs:
    - sympy=1.4

The following packages will be downloaded:
    package                    |            build
    ---------------------------|-----------------
    sympy-1.4                  |           py37_0         9.7 MB
    ------------------------------------------------------------
                                           Total:         9.7 MB
The following packages will be REMOVED:

  anaconda-2019.03-py37_0

The following packages will be UPDATED:

  sympy                                          1.3-py37_0 --> 1.4-py37_0

Proceed ([y]/n)? y

安装后已确认确定:

>python
Python 3.7.3 (default, Mar 27 2019, 22:11:17) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sympy
>>> sympy.__version__
'1.4'
>>> 

我不知道为什么其他命令不起作用。但是以上方法有效。


原始问题 我正在使用64位Linux Manjaro。安装了最新的Anancoda

>which python
/opt/anaconda/bin/python

>conda list anaconda
# packages in environment at /opt/anaconda:
#
# Name                    Version                   Build  Channel
anaconda                  2019.03                  py37_0  
anaconda-client           1.7.2                    py37_0  
anaconda-navigator        1.9.7                    py37_0  
anaconda-project          0.8.2                    py37_0

问题在于它随附了sympy 1.3,而最新的sympy是1.4编码为

https://github.com/sympy/sympy/releases

sympy 1.4已于3周前发布。

现在在做

  >sudo conda update sympy

不更新。它说

## Package Plan ##

  environment location: /opt/anaconda

  added / updated specs:
    - sympy


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    ca-certificates-2019.1.23  |                0         126 KB
    certifi-2019.3.9           |           py37_0         155 KB
    conda-4.6.14               |           py37_0         2.1 MB
    openssl-1.1.1b             |       h7b6447c_1         4.0 MB
    sympy-1.3                  |           py37_0         9.5 MB
    ------------------------------------------------------------
                                           Total:        15.9 MB

但是根据https://anaconda.org/anaconda/sympy,它说sympy 1.4可用

Mathematica graphics

我也尝试了上面的命令,但它不会更新sympy

>sudo conda install -c anaconda sympy

## Package Plan ##

  environment location: /opt/anaconda

  added / updated specs:
    - sympy


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    ca-certificates-2019.1.23  |                0         126 KB  anaconda
    certifi-2019.3.9           |           py37_0         155 KB  anaconda
    conda-4.6.14               |           py37_0         2.1 MB  anaconda
    openssl-1.1.1b             |       h7b6447c_1         4.0 MB  anaconda
    sympy-1.3                  |           py37_0         9.5 MB  anaconda
    ------------------------------------------------------------
                                           Total:        15.9 MB

任何人都知道为什么不更新sympy吗?还有其他尝试吗?我可以从sympy 1.4下载tar文件,但是之后我不知道要怎么做才能将其安装在Anancoda中。

2 个答案:

答案 0 :(得分:1)

当conda更新不想更新软件包时,您可以要求conda明确安装特定版本:conda install sympy=1.4

答案 1 :(得分:-1)

sympy需要首先安装mpmath。更新使用 康达更新sympy