Fiona built error when running conda env update


#1

Hi,

I am following the procedure listed on fastai github site

Normal installation
Download project: git clone https://github.com/fastai/fastai.git
Move into root folder: cd fastai
Set up Python environment: conda env update

But I got the following error messages. How to solve this problem. The machine is Windows 10. Thanks.

  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

  ----------------------------------------
  Failed building wheel for fiona
  Running setup.py clean for fiona
Failed to build fiona
Installing collected packages: fiona, geopandas, plotnine, python-utils, progressbar2, cssselect, configparser, beautifulsoup4, MechanicalSoup, lxml, PrettyTable, pyperclip, cmd2, pbr, stevedore, cliff, kaggle-cli
  Running setup.py install for fiona ... error
    Complete output from command C:\Users\shuxi\Anaconda3\envs\fastai\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\shuxi\\AppData\\Local\\Temp\\pip-install-vx9gpn2j\\fiona\\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\shuxi\AppData\Local\Temp\pip-record-f16oj_r3\install-record.txt --single-version-externally-managed --compile:
    C:\Users\shuxi\Anaconda3\envs\fastai\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'metadata_version'
      warnings.warn(msg)
    C:\Users\shuxi\Anaconda3\envs\fastai\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'requires_python'
      warnings.warn(msg)
    C:\Users\shuxi\Anaconda3\envs\fastai\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'requires_external'
      warnings.warn(msg)
    running install
    running build
    running build_py
    running build_ext
    building 'fiona._transform' extension
    creating build\temp.win-amd64-3.6
    creating build\temp.win-amd64-3.6\Release
    creating build\temp.win-amd64-3.6\Release\fiona
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\shuxi\Anaconda3\envs\fastai\include -IC:\Users\shuxi\Anaconda3\envs\fastai\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /EHsc /Tpfiona/_transform.cpp /Fobuild\temp.win-amd64-3.6\Release\fiona/_transform.obj
    _transform.cpp
    fiona/_transform.cpp(606): fatal error C1083: Cannot open include file: 'cpl_conv.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

    ----------------------------------------
Command "C:\Users\shuxi\Anaconda3\envs\fastai\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\shuxi\\AppData\\Local\\Temp\\pip-install-vx9gpn2j\\fiona\\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\shuxi\AppData\Local\Temp\pip-record-f16oj_r3\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\shuxi\AppData\Local\Temp\pip-install-vx9gpn2j\fiona\

(Pavel) #2

+1 :frowning: Win 7 - 64bit for CPU mode


(Matteo Felici) #3

I solved installing Fiona with the wheels file.

  • Download the last versione of the file at this link (pay attention to the 32-64bit version)
  • launch ‘pip install path/to/Fiona.whl’
  • try again with ‘conda env update’

I did the cpu version, but I think it should work anyway.


(Neerav Mehta) #4

I am getting the same error on Windows 10. Steps suggested by @MatteoFelici unfortunately didn’t help. Any other suggestion?


(Robin) #5

I do have the exact same problem


(Vadiraj Kulkarni) #6

I have the exact same problem. Hopefully someone suggests a solution.


(Sandra Meneses) #7

Thank you, it worked for me :slight_smile: