explosion / spaCy

💫 Industrial-strength Natural Language Processing (NLP) in Python
https://spacy.io
MIT License
29.96k stars 4.39k forks source link

DLL load failed #193

Closed nraw closed 8 years ago

nraw commented 8 years ago

Hey there,

trying to install spaCy the Anaconda way: $ conda config --add channels spacy $ conda install spacy $ python -m spacy.en.download all

The third option fails with error: DLL load failed: The specified module could not be found.

I'm running a python 2.7 64-bit build on 64-bit windows.

Any clues? Thanks!

Best regards, nraw

nraw commented 8 years ago

Hey there again.

I've now tried it with a 32-bit build on 32-bit Windows and the error is the same. Am I missing something?

nraw commented 8 years ago

"Unfortunately we don't currently support Windows." - sad times.

honnibal commented 8 years ago

We're actually very close to supporting Windows. We've worked with a contractor to get the project building, and I thought we had the 32 bit working.

@henningpeters , is there a conda issue?

nraw commented 8 years ago

So I tried sticking with win32 and this is the error I get if I try to go via the pip install route. image

Also, thanks a lot for the reply honnibal :+1:

henningpeters commented 8 years ago

for your pip issue: try downloading/installing stdint.h from here: http://msinttypes.googlecode.com/svn/trunk/stdint.h - looks MS didn't include it in some of their MSVC versions. More details: http://stackoverflow.com/questions/126279/c99-stdint-h-header-and-ms-visual-studio

Will look into the conda builds

maxirmx commented 8 years ago

Please read this file: https://github.com/honnibal/spaCy/blob/master/README-MSVC.txt Win32 will compile but most likely there will be not enough memory.

If you still experience problems with build I will be happy to help

jaridi-abdel commented 8 years ago

I successfully downloaded and installed spacy on windows but when I tried to load the English corpus I get an error after I typed python -m spacy.en.download all The error message is the following DLL load failed: The specified module could not be found

henningpeters commented 8 years ago

@jaridi-abdel It looks as if spaCy didn't get installed correctly, let's try to find the problem...

Can you please provide a bit of information on which Windows you are on, which Python version you are using, how you installed spaCy (via pip, source, conda?) and the output of pip list (if pip) or conda list(if conda)?

In case you installed via pip install spacy, did the installation complete successfully? Also, do you have Visual Studio installed? spaCy ships as source distribution and hence requires a compiler to be installed. Having said that we are thinking about shipping binaries for Windows.

jaridi-abdel commented 8 years ago

Hello I am using pyCham as an IDE, when I start the python console it shows the following: Python 2.7.11 |Continuum Analytics, Inc.| (default, Jan 29 2016, 15:36:56) [MSC v.1500 32 bit (Intel)] on win32 I also also tried with the following version: Python 2.7.11 |Continuum Analytics, Inc.| (default, Jan 29 2016, 14:26:21) [MSC v.1500 64 bit (AMD64)] on win32 But actually I am on a windows 7 64bits with visual studio, also I dowloaded and installed VCForPython27. As for the installation method I used conda to install because I had a rough time installing numpy and scipy using pip, so I had to use conda as a package manager, the following is the ouput of the "conda list" command: cloudpickle 0.1.1 py27_0 defaults conda 3.19.1 py27_0 defaults conda-env 2.4.5 py27_0 defaults cymem 1.30 py27_0 spacy cython 0.23.4 ecdsa 0.13 fabric 1.10.2 fabtools 0.19.0 headers_workaround 0.18 0 spacy menuinst 1.3.2 py27_0 defaults msvc_runtime 1.0.1 vc9_0 [vc9] defaults murmurhash 0.24 py27_0 spacy numpy 1.10.1 py27_0 defaults paramiko 1.16.0 pip 8.0.2 py27_0 defaults plac 0.9.1 py27_0 defaults preshed 0.44 0 spacy pycosat 0.6.1 py27_0 defaults pycrypto 2.6.1 py27_3 defaults python 2.7.11 2 defaults pyyaml 3.11 py27_2 defaults requests 2.9.1 py27_0 defaults scipy 0.16.0 np110py27_0 defaults setuptools 19.6.2 py27_0 defaults six 1.10.0 py27_0 defaults spacy 0.98 py27_0 spacy text-unidecode 1.0 py27_0 spacy thinc 3.4.1 py27_0 spacy ujson 1.35 py27_0 defaults wheel 0.26.0 py27_1 defaults

Thank you for your help

honnibal commented 8 years ago

Ah. Thanks for the details!

We've not yet quite mastered the conda build process, so we're not pushing releases to conda ourselves. Instead we're pushing our releases to pip, and they're getting updated on conda sometime afterwards.

So: you're using a slightly outdated version of spaCy, that doesn't support Windows.

The good news is that conda still supports pip install. So from within your current environment, you should be able to do "pip install --upgrade spacy". This should get you v0.100.2 (the latest), which supports Windows.

On Fri, Feb 5, 2016 at 1:08 PM, jaridi-abdel notifications@github.com wrote:

Hello I am using pyCham as an IDE, when I start the python console it shows the following: Python 2.7.11 |Continuum Analytics, Inc.| (default, Jan 29 2016, 15:36:56) [MSC v.1500 32 bit (Intel)] on win32 I also also tried with the following version: Python 2.7.11 |Continuum Analytics, Inc.| (default, Jan 29 2016, 14:26:21) [MSC v.1500 64 bit (AMD64)] on win32 But actually I am on a windows 7 64bits with visual studio, also I dowloaded and installed VCForPython27. As for the installation method I used conda to install because I had a rough time installing numpy and scipy using pip, so I had to use conda as a package manager, the following is the ouput of the "conda list" command: cloudpickle 0.1.1 py27_0 defaults conda 3.19.1 py27_0 defaults conda-env 2.4.5 py27_0 defaults cymem 1.30 py27_0 spacy cython 0.23.4 ecdsa 0.13 fabric 1.10.2 fabtools 0.19.0 headers_workaround 0.18 0 spacy menuinst 1.3.2 py27_0 defaults msvc_runtime 1.0.1 vc9_0 [vc9] defaults murmurhash 0.24 py27_0 spacy numpy 1.10.1 py27_0 defaults paramiko 1.16.0 pip 8.0.2 py27_0 defaults plac 0.9.1 py27_0 defaults preshed 0.44 0 spacy pycosat 0.6.1 py27_0 defaults pycrypto 2.6.1 py27_3 defaults python 2.7.11 2 defaults pyyaml 3.11 py27_2 defaults requests 2.9.1 py27_0 defaults scipy 0.16.0 np110py27_0 defaults setuptools 19.6.2 py27_0 defaults six 1.10.0 py27_0 defaults spacy 0.98 py27_0 spacy text-unidecode 1.0 py27_0 spacy thinc 3.4.1 py27_0 spacy ujson 1.35 py27_0 defaults wheel 0.26.0 py27_1 defaults

Thank you for your help

— Reply to this email directly or view it on GitHub https://github.com/spacy-io/spaCy/issues/193#issuecomment-180322082.

jaridi-abdel commented 8 years ago

Hello again Mr. Honnibal thank you for your response. When I try to install spacy using pip I get the foloowing errors:

spacy/strings.cpp(248) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory error: command 'C:\Users\elitbook\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2

murmurhash/mrmr.cpp(343) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory error: command 'C:\Users\elitbook\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2

preshed/maps.cpp(248) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory error: command 'C:\Users\elitbook\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2

thinc/api.cpp(249) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory error: command 'C:\Users\elitbook\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2

c1xx : fatal error C1083: Cannot open source file: 'murmurhash/mrmr.cpp': No such file or directory error: command 'C:\Users\elitbook\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2

----------------------------------------

Command "C:\Users\elitbook\Miniconda32\python.exe -u -c "import setuptools, tokenize;file='c:\users\elitbook\appdata\local\temp\pip-build-ct_ymf\murmurhash\setup.py';exec(compile(getattr(tokenize, 'open', op en)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record c:\users\elitbook\appdata\local\temp\pip-wrftqw-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\elitbook\appdata\local\temp\pip-build-ct_ymf\murmurhash

Thank you again

henningpeters commented 8 years ago

That's a well-known problem, some older versions of Visual Studio forgot to ship this file. Here is a good explanation: http://stackoverflow.com/questions/126279/c99-stdint-h-header-and-ms-visual-studio. I thought about whether we can/should should ship the file, but we haven't made the decision about it.

jaridi-abdel commented 8 years ago

Thank you Mr. Peters, spacy is running like a song after I added the stdint.h file to the include folder of VCforPython27 compiler.

Cheers

henningpeters commented 8 years ago

We just published the spaCy release (0.100.5) on our conda channel at https://anaconda.org/spacy/spacy for Linux, OSX and Windows. Please install with conda install -c spacy spacy. When installing via conda you wouldn't need to have the stdint.h in place as conda ships binary packages and hence skips the compilation step.

henningpeters commented 8 years ago

Update: We are now shipping stdint.h together with spaCy, see https://github.com/spacy-io/spaCy/tree/master/include/msvc9.

lock[bot] commented 6 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.