Hi, I followed the following steps to install library
- 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 step of installing fastai library,
But I got the following error message after running conda env update. I tried pip install --upgrade setuptools, but it still generates the following error message.
Collecting shapely (from geopandas>=0.3.0->plotnine->-r C:\Users\shuxi\fastai\condaenv.xnozmcqr.requirements.txt (line 9))
Using cached https://files.pythonhosted.org/packages/a2/fb/7a7af9ef7a35d16fa23b127abee272cfc483ca89029b73e92e93cdf36e6b/Shapely-1.6.4.post2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\shuxi\AppData\Local\Temp\pip-install-2dzeqo5s\shapely\setup.py”, line 80, in
from shapely.buildcfg import geos_version_string, geos_version,
File “C:\Users\shuxi\AppData\Local\Temp\pip-install-2dzeqo5s\shapely\shapely_buildcfg.py”, line 200, in
lgeos = CDLL(“geos_c.dll”)
File "C:\Users\shuxi\Anaconda3\envs\fastai\lib\ctypes_init.py", line 348, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
Command “python setup.py egg_info” failed with error code 1 in C:\Users\shuxi\AppData\Local\Temp\pip-install-2dzeqo5s\shapely\
CondaValueError: pip returned an error
I got the same problem, did you fix it?
Same here! Also looking for a solution
I have the same problem trying install fastai in cpu mode on win 7 - 64 bit
I also stuck in this same situation
Hi, I’m really not sure about what exactly is needed but I managed to solve this error. Here are the things I have done:
- step 0 : install visual studio from the following link : https://visualstudio.microsoft.com/downloads. This is for getting C++ build tools. During the installation, make sure to choose “C++ desktop development” (it takes around 5GB)
- step 1 : install shapely package (thanks mael_08 for testing it)
install shapely via Anaconda Navigator: run Anaconda Navigator, go to Environments tab, click on fastai, select all, and search for shapely. Tick the box, and click Apply.
- step 2 : After solving shapely error, if you have an error about fiona, install fiona package through Anaconda Navigator (it worked for me)
Note: I tried conda install #packagename# but I think it installs the packages independently from the expected env. Not sure what to do, better to stick to Anaconda Navigator packages installation method
Note: the first old method I used is the following: from https://github.com/snorfalorpagus/Shapely/tree/anaconda, I went there https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely and installed a shapely .whl file (just use pip install /Shapely-…whl). The file which worked for me was Shapely-1.6.4.post1-cp36-cp36m-win_amd64.whl. I think cp36 is related to the Python version (I got 3.6.x), and amd64 for windows 64.
thanks! I have followed this steps and “conda env update” is working now!
I can confirm that step1 Method2 works perfectly fine! I tried to install only MS Build tools 2015 instead of visual studio but didn’t work. Finally, I have installed the visual studio 2017 with the C++ tools required in the error message.
Your solution is really helpful. I got stock in it for some hours. That were all the exact problems that I encountered in windows.
Installing visual c++ build tool is required as you mentioned.I also upgraded setuptools too. I don’t know if it directly relates to the problem or not. Thank you