inspirehep / magpie

Deep neural network framework for multi-label text classification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to install magpie on Windows10?

antoinecomp opened this issue · comments

I tried to install magpie on Windows10 with conda like it's recommended in the docs: pip install git+https://github.com/inspirehep/magpie.git@v2.0 but I had errors:

(base) C:\Users\antoi>pip install git+https://github.com/inspirehep/magpie.git@v2.0
...
error: Command "C:\MinGW\bin\gfortran.exe -Wall -g -Wall -g -shared build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqag.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqage.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqagi.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqagie.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqagp.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqagpe.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqags.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqagse.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqawc.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqawce.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqawf.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqawfe.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqawo.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqawoe.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqaws.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqawse.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqc25c.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqc25f.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqc25s.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqcheb.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqelg.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqk15.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqk15i.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqk15w.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqk21.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqk31.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqk41.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqk51.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqk61.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqmomo.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqng.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqpsrt.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqwgtc.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqwgtf.o build\temp.win-amd64-3.6\scipy\integrate\quadpack\dqwgts.o build\temp.win-amd64-3.6\scipy\integrate\mach\d1mach.o build\temp.win-amd64-3.6\scipy\integrate\mach\xerror.o -Lc:\mingw\lib\gcc\mingw32\6.3.0 -Lc:\mingw\lib -LC:\ProgramData\Anaconda3\libs -LC:\ProgramData\Anaconda3\PCbuild\amd64 -Lbuild\temp.win-amd64-3.6 -o build\temp.win-amd64-3.6\Release\.libs\libdqag.W7PDASVWOSXFFJ7HWJHZAUH5TQ2SL3GC.gfortran-win_amd64.dll -Wl,--allow-multiple-definition -Wl,--output-def,build\temp.win-amd64-3.6\Release\libdqag.W7PDASVWOSXFFJ7HWJHZAUH5TQ2SL3GC.gfortran-win_amd64.def -Wl,--export-all-symbols -Wl,--enable-auto-import -static -mlong-double-64" failed with exit status 1

    ----------------------------------------
Command "C:\ProgramData\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\antoi\\AppData\\Local\\Temp\\pip-install-53gin2lu\\scipy\\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\antoi\AppData\Local\Temp\pip-record-yzum5fyd\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\antoi\AppData\Local\Temp\pip-install-53gin2lu\scipy\

I don't know if I should add more of the error message. I didn't find any help googling the error on Internet.

I then tried to install it with from the version we find on bitbucket.org/wolverton/magpie/src/master/ but as it asks to build with Gradle, using the included Gradle wrapper (which will install Gradle on your system if needed): ./gradlew jar I think its specific to Ubuntu. I'm now trying to install it thanks to the precompiled version.

I'm also trying to get all the dependencies listed with in the setup.py file.

@antoinecomp the bitbucket repo is not related to this one, it's different software. Not sure how to help you with the installation problems - I'd try to install the dependencies first one by one in the right versions and see which one is problematic. You can look into setup.py to check out all the dependencies.

Okay for the bitbucket repo. All of the libraries I tested were not exactly what were provided in setup.py

libraries Mine setup.py
scipy 1.1.0 0.18
nltk 3.3 3.2
numpy 1.12 1.12
gensim ? 0.13
scikit-learn ? 0.18
keras ? 2.1.6
h5py ? 2.6
tensorflow ? 1.11.0

scipy is the first I tried. It caused problems. I don't know if it is the main source of them, It's the first I tried, but here is the error message:

(base) C:\Users\antoi>pip install scipy==0.18
Collecting scipy==0.18
  Downloading https://files.pythonhosted.org/packages/01/a1/dce70d47377d662aa4b0895df8431aee92cea6faefaab9dae21b0f901ded/scipy-0.18.0.tar.gz (13.2MB)
    100% |████████████████████████████████| 13.2MB 131kB/s
Building wheels for collected packages: scipy
  Running setup.py bdist_wheel for scipy ... error
  Complete output from command C:\ProgramData\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\antoi\\AppData\\Local\\Temp\\pip-install-8qc2sgzx\\scipy\\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\antoi\AppData\Local\Temp\pip-wheel-gpplvpu9 --python-tag cp36:
  lapack_opt_info:
...
  ----------------------------------------
  Failed cleaning build dir for scipy
Failed to build scipy
Installing collected packages: scipy
  Running setup.py install for scipy ... error
...
,--enable-auto-import -static -mlong-double-64" failed with exit status 1

    ----------------------------------------
Command "C:\ProgramData\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\antoi\\AppData\\Local\\Temp\\pip-install-8qc2sgzx\\scipy\\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\antoi\AppData\Local\Temp\pip-record-jh50hqae\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\antoi\AppData\Local\Temp\pip-install-8qc2sgzx\scipy\

Let me know if it helps you understand what's wrong, @jalavik . I would love to use your software !

@antoinecomp
I use Window 7 64bit and hope can help you.
I installed Anaconda3-5.3.1-Windows-x86_64, deal to Anaconda3-5.3.1-Windows-x86_64 install Python version is 3.7, so I used Anaconda Prompt to install python3.6 (until now Tensorflow only support Python 3.6)
conda install python=3.6

after this, I manually installed all dependency packages by using Anaconda Prompt , and it works fine.