ContinuumIO / anaconda-issues

Anaconda issue tracking
648 stars 224 forks source link

Anaconda metapackage not actually installing anything #9890

Open gonzalocasas opened 6 years ago

gonzalocasas commented 6 years ago

Under certain conditions, the anaconda metapackage doesn't seem to be installing anything.

I tried to create a new environment with the full anaconda metapackage and a slightly older version of Python (3.5.3) on Windows 10, and although seemingly successful, the installation does not contain anything of what anaconda metapackage should include. If I installed anaconda=5.2.0 explicitly instead of letting the metapackage be chosen for the python version I selected, then everything installs properly, but I need this version of python because I'm trying to use it inside Blender and the version should match exactly the bundled one.

Actual Behavior

After creating a new environment with anaconda on it, I expect to be able to import numpy, scipy and a few others:

(blender-353) C:\Users\user>python
Python 3.5.3 | packaged by conda-forge | (default, May 12 2017, 16:16:49) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'numpy'

Expected Behavior

Importing should work 😃

(blender-353) C:\Users\user>python
Python 3.5.3 | packaged by conda-forge | (default, May 12 2017, 16:16:49) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>>

Steps to Reproduce

  1. Create a new environment with python 3.5.3 and anaconda metapackage:

    (base) C:\Users\user>conda create -n blender-353 anaconda python=3.5.3
    Solving environment: done
    
    ## Package Plan ##
    
    environment location: C:\Users\user\Anaconda2\envs\blender-353
    
    added / updated specs:
        - anaconda
        - python=3.5.3
    
    The following NEW packages will be INSTALLED:
    
        anaconda:       custom-py35h64770cb_0
        certifi:        2018.4.16-py35_0      conda-forge
        pip:            18.0-py35_1           conda-forge
        python:         3.5.3-3               conda-forge
        setuptools:     40.0.0-py35_1         conda-forge
        vs2015_runtime: 14.0.25420-0          conda-forge
        wheel:          0.31.1-py35_1         conda-forge
        wincertstore:   0.2-py35_2            conda-forge
    
    Proceed ([y]/n)?
    
    Preparing transaction: done
    Verifying transaction: done
    Executing transaction: done
    #
    # To activate this environment, use
    #
    #     $ conda activate blender-353
    #
    # To deactivate an active environment, use
    #
    #     $ conda deactivate
  2. Activate new environment:

    (base) C:\Users\user>conda activate blender-353
  3. Start python and try importing any of the packages bundled in anaconda:

    (blender-353) C:\Users\user>python
    Python 3.5.3 | packaged by conda-forge | (default, May 12 2017, 16:16:49) [MSC v.1900 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import numpy
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ImportError: No module named 'numpy'
Anaconda or Miniconda version:

anaconda Command line client (version 1.6.5)

Operating System:

Microsoft Windows [Version 10.0.17134.167]

conda info

     active environment : blender-353
    active env location : C:\Users\user\Anaconda2\envs\blender-353
            shell level : 2
       user config file : C:\Users\user\.condarc
 populated config files : C:\Users\user\.condarc
          conda version : 4.5.9
    conda-build version : 3.10.5
         python version : 2.7.14.final.0
       base environment : C:\Users\user\Anaconda2  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/win-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/pro/win-64
                          https://repo.anaconda.com/pkgs/pro/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Users\user\Anaconda2\pkgs
                          C:\Users\user\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\user\Anaconda2\envs
                          C:\Users\user\AppData\Local\conda\conda\envs
                          C:\Users\user\.conda\envs
               platform : win-64
             user-agent : conda/4.5.9 requests/2.18.4 CPython/2.7.14 Windows/10 Windows/10.0.17134
          administrator : False
             netrc file : None
           offline mode : False
conda list --show-channel-urls
# packages in environment at C:\Users\user\Anaconda2\envs\blender-353:
#
# Name                    Version                   Build  Channel
anaconda                  custom           py35h64770cb_0    defaults
certifi                   2018.4.16                py35_0    conda-forge
pip                       18.0                     py35_1    conda-forge
python                    3.5.3                         3    conda-forge
setuptools                40.0.0                   py35_1    conda-forge
vs2015_runtime            14.0.25420                    0    conda-forge
wheel                     0.31.1                   py35_1    conda-forge
wincertstore              0.2                      py35_2    conda-forge
cat .condarc
channels:
  - conda-forge
  - defaults
ssl_verify: true
mingwandroid commented 6 years ago

Blender comes with it's own Python interpreter so you need to use that one.

gonzalocasas commented 6 years ago

@mingwandroid thanks for the fast reply, but that's not totally correct. Using anaconda environments should work as long as the version of python matches the one bundled, see here for documented details on how to set it up: https://janakiev.com/til/using-anaconda-in-blender/

mingwandroid commented 6 years ago

I wouldn't follow that advice esp the bit about copying. The hard link may work better but it's unlikely

gonzalocasas commented 6 years ago

@mingwandroid agree with the copying.

In any case, this issue is not about Blender itself, it's about the fact that anaconda metapackage didn't really install anything. Blender is only the reason why I use python 3.5 instead of a newer one.