代码之家  ›  专栏  ›  技术社区  ›  Bill

Conda命令不作用于当前环境,Python版本

  •  0
  • Bill  · 技术社区  · 6 年前

    恐怕我不明白康达是怎么工作的。

    我有一个安装了Python 3.6的环境,但每次我使用conda命令时,它都会显示“消息:试用模式将在28天后过期”,并显示“请升级到2.7”。x释放'。

    我的基本Python是2.7,但我不明白为什么它会在3.6的环境中引用它。

    (py36) BillsMacBookPro-9:~ billtubbs$ conda info
    Vendor:  continuum
    Product: anaconda
    Message: trial mode expires in 28 days
    /Users/billtubbs/anaconda/lib/python2.7/site-packages/cryptography/hazmat/primitives/constant_time.py:26: CryptographyDeprecationWarning: Support for your Python version is deprecated. The next version of cryptography will remove support. Please upgrade to a 2.7.x release that supports hmac.compare_digest as soon as possible.
      utils.DeprecatedIn23,
    
         active environment : py36
        active env location : /Users/billtubbs/anaconda/envs/py36
                shell level : 1
           user config file : /Users/billtubbs/.condarc
     populated config files : /Users/billtubbs/.condarc
              conda version : 4.6.3
        conda-build version : 3.10.5
             python version : 2.7.3.final.0
           base environment : /Users/billtubbs/anaconda  (writable)
               channel URLs : https://conda.anaconda.org/conda-forge/osx-64
                              https://conda.anaconda.org/conda-forge/noarch
                              https://repo.anaconda.com/pkgs/main/osx-64
                              https://repo.anaconda.com/pkgs/main/noarch
                              https://repo.anaconda.com/pkgs/free/osx-64
                              https://repo.anaconda.com/pkgs/free/noarch
                              https://repo.anaconda.com/pkgs/r/osx-64
                              https://repo.anaconda.com/pkgs/r/noarch
              package cache : /Users/billtubbs/anaconda/pkgs
                              /Users/billtubbs/.conda/pkgs
           envs directories : /Users/billtubbs/anaconda/envs
                              /Users/billtubbs/.conda/envs
                   platform : osx-64
                 user-agent : conda/4.6.3 requests/2.19.1 CPython/2.7.3 Darwin/18.2.0 OSX/10.14.3
                    UID:GID : 501:20
                 netrc file : None
               offline mode : False
    
    (py36) BillsMacBookPro-9:~ billtubbs$ which python
    /Users/billtubbs/anaconda/envs/py36/bin/python
    (py36) BillsMacBookPro-9:~ billtubbs$ python --version
    Python 3.6.8 :: Anaconda custom (64-bit)
    (py36) BillsMacBookPro-9:~ billtubbs$ python
    Python 3.6.8 |Anaconda custom (64-bit)| (default, Dec 29 2018, 19:04:46) 
    [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> 
    

    我试过了 conda update conda .这不是更新了当前环境中的所有内容吗?

    我也试过了 conda install conda 从这个环境中 here 结果如下:

    (py36) BillsMacBookPro-9:~ billtubbs$ conda install conda
    Vendor:  continuum
    Product: anaconda
    Message: trial mode expires in 28 days
    /Users/billtubbs/anaconda/lib/python2.7/site-packages/cryptography/hazmat/primitives/constant_time.py:26: CryptographyDeprecationWarning: Support for your Python version is deprecated. The next version of cryptography will remove support. Please upgrade to a 2.7.x release that supports hmac.compare_digest as soon as possible.
      utils.DeprecatedIn23,
    Collecting package metadata: done
    Solving environment: done
    
    
    ==> WARNING: A newer version of conda exists. <==
      current version: 4.6.2
      latest version: 4.6.3
    
    Please update conda by running
    
        $ conda update -n base conda
    
    
    
    ## Package Plan ##
    
      environment location: /Users/billtubbs/anaconda/envs/py36
    
      added / updated specs:
        - conda
    
    
    The following packages will be downloaded:
    
        package                    |            build
        ---------------------------|-----------------
        conda-4.6.3                |           py36_0         875 KB  conda-forge
        cryptography-2.5           |   py36ha12b0ac_0         590 KB
        curl-7.63.0                |    ha441bb4_1000         138 KB
        grpcio-1.16.1              |   py36h044775b_1         944 KB
        krb5-1.16.1                |       hddcf347_7         1.1 MB
        libcurl-7.63.0             |    h051b688_1000         532 KB
        libedit-3.1.20170329       |    hcfe32e1_1001         152 KB  conda-forge
        libssh2-1.8.0              |                1         256 KB  conda-forge
        pycurl-7.43.0.2            |   py36ha12b0ac_0         185 KB
        ------------------------------------------------------------
                                               Total:         4.7 MB
    
    The following NEW packages will be INSTALLED:
    
      conda              conda-forge/osx-64::conda-4.6.3-py36_0
      libcurl            pkgs/main/osx-64::libcurl-7.63.0-h051b688_1000
      libedit            conda-forge/osx-64::libedit-3.1.20170329-hcfe32e1_1001
    
    The following packages will be UPDATED:
    
      cryptography       conda-forge::cryptography-2.2.1-py36_0 --> pkgs/main::cryptography-2.5-py36ha12b0ac_0
      curl                           conda-forge::curl-7.60.0-0 --> pkgs/main::curl-7.63.0-ha441bb4_1000
      grpcio             conda-forge::grpcio-1.16.0-py36hd60e7~ --> pkgs/main::grpcio-1.16.1-py36h044775b_1
      krb5                           conda-forge::krb5-1.14.6-0 --> pkgs/main::krb5-1.16.1-hddcf347_7
      openssl                                 1.0.2p-h470a237_1 --> 1.1.1a-h1de35cc_1000
      pycurl                            7.43.0.1-py36hdbc3d79_0 --> 7.43.0.2-py36ha12b0ac_0
      python               conda-forge::python-3.6.6-h5001a0f_0 --> pkgs/main::python-3.6.8-haf84260_0
      sqlite                                  3.24.0-h2f33b56_0 --> 3.26.0-h1765d9f_1000
      xz                                                5.2.3-0 --> 5.2.4-h1de35cc_1001
    
    The following packages will be DOWNGRADED:
    
      libssh2                                           1.8.0-2 --> 1.8.0-1
    
    
    Proceed ([y]/n)? y
    
    
    Downloading and Extracting Packages
    pycurl-7.43.0.2      | 185 KB    | ################################### | 100% 
    libssh2-1.8.0        | 256 KB    | ################################### | 100% 
    conda-4.6.3          | 875 KB    | ################################### | 100% 
    cryptography-2.5     | 590 KB    | ################################### | 100% 
    curl-7.63.0          | 138 KB    | ################################### | 100% 
    grpcio-1.16.1        | 944 KB    | ################################### | 100% 
    krb5-1.16.1          | 1.1 MB    | ################################### | 100% 
    libedit-3.1.20170329 | 152 KB    | ################################### | 100% 
    libcurl-7.63.0       | 532 KB    | ################################### | 100% 
    Preparing transaction: done
    Verifying transaction: done
    Executing transaction: done
    Vendor:  continuum
    Product: anaconda
    Message: trial mode expires in 28 days
    

    也许是时候删除我的整个conda环境并重新安装它们了。。。

    0 回复  |  直到 6 年前