none
Can't install packages to Anaconda 4.3.0 python environment RRS feed

  • Question

  • Hi there.

    I'm trying to do some research project in python in Visual Studio 2017 Preview. I've installed VS 2017 Preview version and all python tools, including python 2.7, python 3.6, anaconda 4.3.0. Everything works fine with preistalled packages in python environments, and I can install some additional packages. But if installing a package involves a C compilation - I get an error. For example, if try to install package "bcolz":

    ----- Installing 'bcolz' -----
    Collecting bcolz
      Using cached bcolz-1.1.2.tar.gz
    Requirement already satisfied: numpy>=1.7 in c:\program files\anaconda3\lib\site-packages (from bcolz)
    Building wheels for collected packages: bcolz
      Running setup.py bdist_wheel for bcolz: started
      Running setup.py bdist_wheel for bcolz: finished with status 'error'
      Complete output from command "C:\Program Files\Anaconda3\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\PAA\\AppData\\Local\\Temp\\pip-build-e2b2o1_u\\bcolz\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\PAA\AppData\Local\Temp\tmpv5cthv2hpip-wheel- --python-tag cp36:
      SSE2 detected
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.6
      creating build\lib.win-amd64-3.6\bcolz
      copying bcolz\arrayprint.py -> build\lib.win-amd64-3.6\bcolz
      copying bcolz\attrs.py -> build\lib.win-amd64-3.6\bcolz
      copying bcolz\chunked_eval.py -> build\lib.win-amd64-3.6\bcolz
      copying bcolz\ctable.py -> build\lib.win-amd64-3.6\bcolz
      copying bcolz\defaults.py -> build\lib.win-amd64-3.6\bcolz
      copying bcolz\py2help.py -> build\lib.win-amd64-3.6\bcolz
      copying bcolz\py2help_tests.py -> build\lib.win-amd64-3.6\bcolz
      copying bcolz\toplevel.py -> build\lib.win-amd64-3.6\bcolz
      copying bcolz\utils.py -> build\lib.win-amd64-3.6\bcolz
      copying bcolz\version.py -> build\lib.win-amd64-3.6\bcolz
      copying bcolz\__init__.py -> build\lib.win-amd64-3.6\bcolz
      creating build\lib.win-amd64-3.6\bcolz\tests
      copying bcolz\tests\all.py -> build\lib.win-amd64-3.6\bcolz\tests
      copying bcolz\tests\common.py -> build\lib.win-amd64-3.6\bcolz\tests
      copying bcolz\tests\test_attrs.py -> build\lib.win-amd64-3.6\bcolz\tests
      copying bcolz\tests\test_carray.py -> build\lib.win-amd64-3.6\bcolz\tests
      copying bcolz\tests\test_carray_objects.py -> build\lib.win-amd64-3.6\bcolz\tests
      copying bcolz\tests\test_ctable.py -> build\lib.win-amd64-3.6\bcolz\tests
      copying bcolz\tests\test_ndcarray.py -> build\lib.win-amd64-3.6\bcolz\tests
      copying bcolz\tests\test_queries.py -> build\lib.win-amd64-3.6\bcolz\tests
      copying bcolz\tests\__init__.py -> build\lib.win-amd64-3.6\bcolz\tests
      copying bcolz\carray_ext.pxd -> build\lib.win-amd64-3.6\bcolz
      running build_ext
      skipping 'bcolz\carray_ext.c' Cython extension (up-to-date)
      building 'bcolz.carray_ext' extension
      creating build\temp.win-amd64-3.6
      creating build\temp.win-amd64-3.6\Release
      creating build\temp.win-amd64-3.6\Release\bcolz
      creating build\temp.win-amd64-3.6\Release\c-blosc
      creating build\temp.win-amd64-3.6\Release\c-blosc\blosc
      creating build\temp.win-amd64-3.6\Release\c-blosc\internal-complibs
      creating build\temp.win-amd64-3.6\Release\c-blosc\internal-complibs\lz4-1.7.5
      creating build\temp.win-amd64-3.6\Release\c-blosc\internal-complibs\snappy-1.1.1
      creating build\temp.win-amd64-3.6\Release\c-blosc\internal-complibs\zlib-1.2.8
      creating build\temp.win-amd64-3.6\Release\c-blosc\internal-complibs\zstd-1.1.2
      creating build\temp.win-amd64-3.6\Release\c-blosc\internal-complibs\zstd-1.1.2\common
      creating build\temp.win-amd64-3.6\Release\c-blosc\internal-complibs\zstd-1.1.2\compress
      creating build\temp.win-amd64-3.6\Release\c-blosc\internal-complibs\zstd-1.1.2\decompress
      creating build\temp.win-amd64-3.6\Release\c-blosc\internal-complibs\zstd-1.1.2\deprecated
      creating build\temp.win-amd64-3.6\Release\c-blosc\internal-complibs\zstd-1.1.2\dictBuilder
      creating build\temp.win-amd64-3.6\Release\c-blosc\internal-complibs\zstd-1.1.2\legacy
      cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DHAVE_LZ4=1 -DHAVE_SNAPPY=1 -DHAVE_ZLIB=1 -DHAVE_ZSTD=1 -D__SSE2__=1 -Ibcolz -Ic-blosc\blosc -Ic-blosc/internal-complibs\lz4-1.7.5 -Ic-blosc/internal-complibs\snappy-1.1.1 -Ic-blosc/internal-complibs\zlib-1.2.8 -Ic-blosc/internal-complibs\zstd-1.1.2 -Ic-blosc/internal-complibs\zstd-1.1.2\common -Ic-blosc/internal-complibs\zstd-1.1.2\compress -Ic-blosc/internal-complibs\zstd-1.1.2\decompress -Ic-blosc/internal-complibs\zstd-1.1.2\deprecated -Ic-blosc/internal-complibs\zstd-1.1.2\dictBuilder -Ic-blosc/internal-complibs\zstd-1.1.2\dll -Ic-blosc/internal-complibs\zstd-1.1.2\legacy "-IC:\Program Files\Anaconda3\lib\site-packages\numpy\core\include" "-IC:\Program Files\Anaconda3\include" "-IC:\Program Files\Anaconda3\include" /Tcbcolz\carray_ext.c /Fobuild\temp.win-amd64-3.6\Release\bcolz\carray_ext.obj -DSHUFFLE_SSE2_ENABLED
      error: command 'cl.exe' failed: No such file or directory
      
      ----------------------------------------
      Running setup.py clean for bcolz
      Failed building wheel for bcolz
    Failed to build bcolz
    Installing collected packages: bcolz
      Running setup.py install for bcolz: started
        Running setup.py install for bcolz: finished with status 'error'
        Complete output from command "C:\Program Files\Anaconda3\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\PAA\\AppData\\Local\\Temp\\pip-build-e2b2o1_u\\bcolz\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\PAA\AppData\Local\Temp\pip-mzvfv6xe-record\install-record.txt --single-version-externally-managed --compile:
        SSE2 detected
        running install
        running build
        running build_py
        creating build
        creating build\lib.win-amd64-3.6
        creating build\lib.win-amd64-3.6\bcolz
        copying bcolz\arrayprint.py -> build\lib.win-amd64-3.6\bcolz
        copying bcolz\attrs.py -> build\lib.win-amd64-3.6\bcolz
        copying bcolz\chunked_eval.py -> build\lib.win-amd64-3.6\bcolz
        copying bcolz\ctable.py -> build\lib.win-amd64-3.6\bcolz
        copying bcolz\defaults.py -> build\lib.win-amd64-3.6\bcolz
        copying bcolz\py2help.py -> build\lib.win-amd64-3.6\bcolz
        copying bcolz\py2help_tests.py -> build\lib.win-amd64-3.6\bcolz
        copying bcolz\toplevel.py -> build\lib.win-amd64-3.6\bcolz
        copying bcolz\utils.py -> build\lib.win-amd64-3.6\bcolz
        copying bcolz\version.py -> build\lib.win-amd64-3.6\bcolz
        copying bcolz\__init__.py -> build\lib.win-amd64-3.6\bcolz
        creating build\lib.win-amd64-3.6\bcolz\tests
        copying bcolz\tests\all.py -> build\lib.win-amd64-3.6\bcolz\tests
        copying bcolz\tests\common.py -> build\lib.win-amd64-3.6\bcolz\tests
        copying bcolz\tests\test_attrs.py -> build\lib.win-amd64-3.6\bcolz\tests
        copying bcolz\tests\test_carray.py -> build\lib.win-amd64-3.6\bcolz\tests
        copying bcolz\tests\test_carray_objects.py -> build\lib.win-amd64-3.6\bcolz\tests
        copying bcolz\tests\test_ctable.py -> build\lib.win-amd64-3.6\bcolz\tests
        copying bcolz\tests\test_ndcarray.py -> build\lib.win-amd64-3.6\bcolz\tests
        copying bcolz\tests\test_queries.py -> build\lib.win-amd64-3.6\bcolz\tests
        copying bcolz\tests\__init__.py -> build\lib.win-amd64-3.6\bcolz\tests
        copying bcolz\carray_ext.pxd -> build\lib.win-amd64-3.6\bcolz
        running build_ext
        skipping 'bcolz\carray_ext.c' Cython extension (up-to-date)
        building 'bcolz.carray_ext' extension
        creating build\temp.win-amd64-3.6
        creating build\temp.win-amd64-3.6\Release
        creating build\temp.win-amd64-3.6\Release\bcolz
        creating build\temp.win-amd64-3.6\Release\c-blosc
        creating build\temp.win-amd64-3.6\Release\c-blosc\blosc
        creating build\temp.win-amd64-3.6\Release\c-blosc\internal-complibs
        creating build\temp.win-amd64-3.6\Release\c-blosc\internal-complibs\lz4-1.7.5
        creating build\temp.win-amd64-3.6\Release\c-blosc\internal-complibs\snappy-1.1.1
        creating build\temp.win-amd64-3.6\Release\c-blosc\internal-complibs\zlib-1.2.8
        creating build\temp.win-amd64-3.6\Release\c-blosc\internal-complibs\zstd-1.1.2
        creating build\temp.win-amd64-3.6\Release\c-blosc\internal-complibs\zstd-1.1.2\common
        creating build\temp.win-amd64-3.6\Release\c-blosc\internal-complibs\zstd-1.1.2\compress
        creating build\temp.win-amd64-3.6\Release\c-blosc\internal-complibs\zstd-1.1.2\decompress
        creating build\temp.win-amd64-3.6\Release\c-blosc\internal-complibs\zstd-1.1.2\deprecated
        creating build\temp.win-amd64-3.6\Release\c-blosc\internal-complibs\zstd-1.1.2\dictBuilder
        creating build\temp.win-amd64-3.6\Release\c-blosc\internal-complibs\zstd-1.1.2\legacy
        cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DHAVE_LZ4=1 -DHAVE_SNAPPY=1 -DHAVE_ZLIB=1 -DHAVE_ZSTD=1 -D__SSE2__=1 -Ibcolz -Ic-blosc\blosc -Ic-blosc/internal-complibs\lz4-1.7.5 -Ic-blosc/internal-complibs\snappy-1.1.1 -Ic-blosc/internal-complibs\zlib-1.2.8 -Ic-blosc/internal-complibs\zstd-1.1.2 -Ic-blosc/internal-complibs\zstd-1.1.2\common -Ic-blosc/internal-complibs\zstd-1.1.2\compress -Ic-blosc/internal-complibs\zstd-1.1.2\decompress -Ic-blosc/internal-complibs\zstd-1.1.2\deprecated -Ic-blosc/internal-complibs\zstd-1.1.2\dictBuilder -Ic-blosc/internal-complibs\zstd-1.1.2\dll -Ic-blosc/internal-complibs\zstd-1.1.2\legacy "-IC:\Program Files\Anaconda3\lib\site-packages\numpy\core\include" "-IC:\Program Files\Anaconda3\include" "-IC:\Program Files\Anaconda3\include" /Tcbcolz\carray_ext.c /Fobuild\temp.win-amd64-3.6\Release\bcolz\carray_ext.obj -DSHUFFLE_SSE2_ENABLED
        error: command 'cl.exe' failed: No such file or directory
        
        ----------------------------------------
    Command ""C:\Program Files\Anaconda3\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\PAA\\AppData\\Local\\Temp\\pip-build-e2b2o1_u\\bcolz\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\PAA\AppData\Local\Temp\pip-mzvfv6xe-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\PAA\AppData\Local\Temp\pip-build-e2b2o1_u\bcolz\
    ----- Failed to install 'bcolz' -----
    All I can see, pip utility doesn't see C compiler (cl.exe). Official documentation of using VC compiler via command prompt tells me I need to run script 'vcvars64.bat' to set environmental variables (PATH, INCLUDE, LIB), but how I should run it before 'pip install' command, if I just clicking "Install bcolz" in search window?

    • Moved by 宝宝徐 Friday, May 19, 2017 1:49 AM
    Wednesday, May 17, 2017 8:43 AM

All replies

  • Hi,

    Please have a look at here: https://www.visualstudio.com/vs/preview/?wt.mc_id=github_microsoft_ptvs

    In the Frequently Asked Questions:

    Visual Studio “Preview” is designed for you to get an early look at upcoming features and changes, and to provide feedback on those changes. While, Visual Studio “Preview” is not covered by Microsoft Technical Support, we encourage you to submit your feedback via Report-a-Problem, and we’ll make every effort to respond to that feedback.

    Best regards,

    Joyce


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, May 18, 2017 8:21 AM