maciejkula / glove-python

Toy Python implementation of http://www-nlp.stanford.edu/projects/glove/
Apache License 2.0
1.25k stars 319 forks source link

install issue on windows 10 #82

Open ssditeam9 opened 6 years ago

ssditeam9 commented 6 years ago

I am running the command pip install glove_python

C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\bin\HostX86\x86\link.exe /nologo /INCREMENTAL:NO /LTCG /nodefaultlib:libucrt.lib ucrt.lib /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\users\hi5an\appdata\local\programs\python\python35-32\libs /LIBPATH:c:\users\hi5an\appdata\local\programs\python\python35-32\PCbuild\win32 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\Lib\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\um\x86" /LIBPATH:C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319 "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\ucrt\x86" stdc++.lib /EXPORT:PyInit_corpus_cython build\temp.win32-3.5\Release\glove/corpus_cython.obj /OUT:build\lib.win32-3.5\glove\corpus_cython.cp35-win32.pyd /IMPLIB:build\temp.win32-3.5\Release\glove\corpus_cython.cp35-win32.lib -fopenmp -ffast-math -march=native LINK : warning LNK4044: unrecognized option '/fopenmp'; ignored LINK : warning LNK4044: unrecognized option '/ffast-math'; ignored LINK : warning LNK4044: unrecognized option '/march=native'; ignored LINK : fatal error LNK1181: cannot open input file 'stdc++.lib' error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\bin\HostX86\x86\link.exe' failed with exit status 1181

Complete logs in the attached file log.txt

AntoineBD commented 6 years ago

Hi ssditeam9, I have the same error, i found this https://github.com/maciejkula/glove-python/issues/42, rahul4tripathi2 gives a solution, it doesn't work for me but maybe for you yes.

IronFarm commented 6 years ago

Could you try following my installation instructions I added to the wiki? https://github.com/maciejkula/glove-python/wiki/Installation-on-Windows

p-nice commented 5 years ago

I am trying to install glove-python on windows 10, using Anaconda. I tried: pip install glove-python python setup.py install (in the cloned directory) Both give errors.

Then I followed the instructions in the wiki (https://github.com/maciejkula/glove-python/wiki/Installation-on-Windows) but this does not work neither (full log attached):

(base) C:\glove-python-master>python setup.py build_ext --compiler=mingw32 running build_ext building 'glove.glove_cython' extension creating build creating build\temp.win-amd64-3.7 creating build\temp.win-amd64-3.7\Release creating build\temp.win-amd64-3.7\Release\glove C:\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -IC:\Users\Peter\Anaconda3\include -IC:\Users\Peter\Anaconda3\include -c glove/glove_cython.c -o build\temp.win-amd64-3.7\Release\glove\glove_cython.o -fopenmp -ffast-math -march=native glove/glove_cython.c: In function '__Pyx_ExceptionSave': glove/glove_cython.c:16753:21: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_type'; did you mean 'curexc_type'? type = tstate->exc_type; ^~~~ curexc_type glove/glove_cython.c:16754:22: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_value'; did you mean 'curexc_value'? value = tstate->exc_value; ^~~~~ curexc_value [... many more lines...] glove/glove_cython.c:16847:13: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_traceback'; did you mean 'curexc_traceback'? tstate->exc_traceback = *tb; ^~~~~ curexc_traceback error: command 'C:\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin\gcc.exe' failed with exit status 1

log.txt

IronFarm commented 5 years ago

@p-nice It seems the version of Cython this repository uses is incompatible with Python 3.7. I've replicated your issue with Python 3.7 and verified that downgrading to Python 3.6 works correctly.

Please

  1. Downgrade to Python 3.6 conda install "python<3.7"
  2. Run the build command again python setup.py build_ext --compiler=mingw32

I'll update the wiki to reflect the incompatibility.

barnabychan commented 5 years ago

Could you try following my installation instructions I added to the wiki? https://github.com/maciejkula/glove-python/wiki/Installation-on-Windows

Hi, I can't seem to pip install libpython - it doesn't appear to exist in pypi repo. And am on Python 3.6

IronFarm commented 5 years ago

@barnabychan yes it seems you're right. libpython is only available through conda. There may be a workaround if you're not using conda but I'm not sure.

I've updated the wiki to reflect this.

seeyourmind commented 5 years ago

@IronFarm I followed the instructions in the wiki (https://github.com/maciejkula/glove-python/wiki/Installation-on-Windows) but this does not work neither python 3.6.2 and I install glove-python on windows 10, using Anaconda. I get errors when I run python setup.py build_ext --compiler=mingw32

running build_ext Traceback (most recent call last): File "setup.py", line 155, in <module> ext_modules=define_extensions() File "C:\UserApp\Anaconda\envs\tf-gpu\lib\site-packages\setuptools\__init__.py", line 129, in setup return distutils.core.setup(**attrs) File "C:\UserApp\Anaconda\envs\tf-gpu\lib\distutils\core.py", line 148, in setup dist.run_commands() File "C:\UserApp\Anaconda\envs\tf-gpu\lib\distutils\dist.py", line 955, in run_commands self.run_command(cmd) File "C:\UserApp\Anaconda\envs\tf-gpu\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "C:\UserApp\Anaconda\envs\tf-gpu\lib\site-packages\setuptools\command\build_ext.py", line 78, in run _build_ext.run(self) File "C:\UserApp\Anaconda\envs\tf-gpu\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run _build_ext.build_ext.run(self) File "C:\UserApp\Anaconda\envs\tf-gpu\lib\distutils\command\build_ext.py", line 308, in run force=self.force) File "C:\UserApp\Anaconda\envs\tf-gpu\lib\distutils\ccompiler.py", line 1031, in new_compiler return klass(None, dry_run, force) File "C:\UserApp\Anaconda\envs\tf-gpu\lib\distutils\cygwinccompiler.py", line 285, in __init__ CygwinCCompiler.__init__ (self, verbose, dry_run, force) File "C:\UserApp\Anaconda\envs\tf-gpu\lib\distutils\cygwinccompiler.py", line 129, in __init__ if self.ld_version >= "2.10.90": TypeError: '>=' not supported between instances of 'NoneType' and 'str'

IronFarm commented 5 years ago

@seeyourmind It looks like it isn't using your install of MinGW. What is the output of the command where gcc.exe?

seeyourmind commented 5 years ago

@IronFarm C:\UserApp\mingw64\bin\gcc.exe is my install path of MinGW

IronFarm commented 5 years ago

@seeyourmind but does the Windows terminal correctly detect it when you type gcc.exe in another directory?

seeyourmind commented 5 years ago

@IronFarm I run the code in the root directory,and the teminal can detect the path of mingw correctly.

seeyourmind commented 5 years ago

@IronFarm it also can be recognised if I changed into another path

IronFarm commented 5 years ago

What is the full log from the build_ext command? e.g. when I run mine prints

running build_ext
building 'glove.glove_cython' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\glove
E:\mingw64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -IE:\Anaconda2\envs\glove-compi
le\include -IE:\Anaconda2\envs\glove-compile\include -c glove/glove_cython.c -o
build\temp.win-amd64-3.6\Release\glove\glove_cython.o -fopenmp -ffast-math

This demonstrates it's correctly using gcc.exe.

seeyourmind commented 5 years ago

@IronFarm oh sorry,they are all the logs in my first message I send to you. I executed the command of build_ext in my enviroment of tensorflow which I configured in anaconda,and then I got all the error logs as follows running build_ext Traceback (most recent call last): File "setup.py", line 155, in <module> ext_modules=define_extensions() File "C:\UserApp\Anaconda\envs\tf-gpu\lib\site-packages\setuptools\__init__.py", line 129, in setup return distutils.core.setup(**attrs) File "C:\UserApp\Anaconda\envs\tf-gpu\lib\distutils\core.py", line 148, in setup dist.run_commands() File "C:\UserApp\Anaconda\envs\tf-gpu\lib\distutils\dist.py", line 955, in run_commands self.run_command(cmd) File "C:\UserApp\Anaconda\envs\tf-gpu\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "C:\UserApp\Anaconda\envs\tf-gpu\lib\site-packages\setuptools\command\build_ext.py", line 78, in run _build_ext.run(self) File "C:\UserApp\Anaconda\envs\tf-gpu\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run _build_ext.build_ext.run(self) File "C:\UserApp\Anaconda\envs\tf-gpu\lib\distutils\command\build_ext.py", line 308, in run force=self.force) File "C:\UserApp\Anaconda\envs\tf-gpu\lib\distutils\ccompiler.py", line 1031, in new_compiler return klass(None, dry_run, force) File "C:\UserApp\Anaconda\envs\tf-gpu\lib\distutils\cygwinccompiler.py", line 285, in __init__ CygwinCCompiler.__init__ (self, verbose, dry_run, force) File "C:\UserApp\Anaconda\envs\tf-gpu\lib\distutils\cygwinccompiler.py", line 129, in __init__ if self.ld_version >= "2.10.90": TypeError: '>=' not supported between instances of 'NoneType' and 'str'

IronFarm commented 5 years ago

I don't understand why it mentions cygwin in the output if it's using MinGW. Can you print the FULL output of the command where gcc.exe?

seeyourmind commented 5 years ago

@IronFarm only one line of output C:\UserApp\mingw64\bin\gcc.exe

IronFarm commented 5 years ago

I really have no idea. Are you using cygwin or cmd to run the commands? What version of libpython did you install with conda (you can use conda list to find this out)?

seeyourmind commented 5 years ago

@IronFarm conda list as follows: Name Version Build Channel absl-py 0.7.0 astor 0.7.1 blas 1.0 mkl
boto 2.48.0 py36_0
bz2file 0.98 py36_0
certifi 2016.2.28 py36_0
Cython 0.29.7 gast 0.2.2 gensim 2.3.0 np113py36_0
grpcio 1.19.0 h5py 2.9.0 Keras 2.2.4 Keras-Applications 1.0.7 Keras-Preprocessing 1.0.9 libpython 1.0 Markdown 3.0.1 mingw 4.7 1
mkl 2017.0.3 0
numpy 1.14.5 numpy 1.13.1 py36_0
pandas 0.24.2 pip 9.0.1 py36_1
protobuf 3.7.0 python 3.6.2 0
python-dateutil 2.8.0 pytz 2019.1 PyYAML 5.1 requests 2.14.2 py36_0
scikit-learn 0.20.3 scipy 1.2.1 scipy 0.19.1 np113py36_0
setuptools 39.1.0 setuptools 36.4.0 py36_1
six 1.12.0 six 1.10.0 py36_0
sklearn 0.0 smart_open 1.5.3 py36_0
tensorboard 1.10.0 tensorflow-gpu 1.10.0 termcolor 1.1.0 vc 14 0
vs2015_runtime 14.0.25420 0
Werkzeug 0.14.1 wheel 0.29.0 py36_0
wheel 0.33.2 wincertstore 0.2 py36_0

seeyourmind commented 5 years ago

@IronFarm and Thank you for your timely reply. I haven't found a solution to this problem yet, so I'm still using gensim.word2vec.

IronFarm commented 5 years ago

The environment I use has libpython 2.10, yours has libpython 1.0. That could explain your original error message as the version it requires is also 2.10. Could you upgrade libpython to the latest version using anaconda?

seeyourmind commented 5 years ago

@IronFarm Thank you very much! I upgraded libpython, and installed glove-python successfully.

IronFarm commented 5 years ago

Great to hear. I'll update the wiki to reflect this.

AHAMES commented 4 years ago

Hey, I am getting the following with trying to install glove, any idea

(myenv) PS C:\glove-python> python setup.py build_ext --compiler=mingw32
running build_ext
building 'glove.corpus_cython' extension
C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -IC:\anaconda\envs\myenv\include -IC:\anaconda\envs\myenv\include -c glove/corpus_cython.cpp -o build\temp.win-amd64-3.6\Release\glove\corpus_cython.o -fopenmp -ffast-math
In file included from C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/math.h:36,
                 from C:\anaconda\envs\myenv\include/pyport.h:194,
                 from C:\anaconda\envs\myenv\include/Python.h:53,
                 from glove/corpus_cython.cpp:26:
C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/cmath:1121:11: error: '::hypot' has not been declared
   using ::hypot;
           ^~~~~
glove/corpus_cython.cpp: In function 'void __pyx_f_5glove_13corpus_cython_increment_matrix(__pyx_t_5glove_13corpus_cython_SparseRowMatrix*, int, int, float)':
glove/corpus_cython.cpp:1894:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long long unsigned int'} [-Wsign-compare]
     __pyx_t_1 = ((__pyx_v_row >= __pyx_v_mat->indices->size()) != 0);
                   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
glove/corpus_cython.cpp:2036:29: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long long unsigned int'} [-Wsign-compare]
   __pyx_t_1 = ((__pyx_v_idx == __pyx_v_row_indices->size()) != 0);
                 ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
glove/corpus_cython.cpp: In function 'int __pyx_f_5glove_13corpus_cython_matrix_nnz(__pyx_t_5glove_13corpus_cython_SparseRowMatrix*)':
glove/corpus_cython.cpp:2225:33: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long long unsigned int'} [-Wsign-compare]
   for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
                       ~~~~~~~~~~^~~~~~~~~~~
glove/corpus_cython.cpp: In function 'PyObject* __pyx_f_5glove_13corpus_cython_matrix_to_coo(__pyx_t_5glove_13corpus_cython_SparseRowMatrix*, int)':
glove/corpus_cython.cpp:2496:37: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long long unsigned int'} [-Wsign-compare]
     for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
                          ~~~~~~~~~~~^~~~~~~~~~~~
error: command 'C:\\ProgramData\\chocolatey\\lib\\mingw\\tools\\install\\mingw64\\bin\\gcc.exe' failed with exit status 1
IronFarm commented 4 years ago

@AHAMES which version of python are you using? If you have Cython installed then re-generating the .cpp files may fix your issue. You can do this by running the command python setup.py cythonize.

sheilaabad commented 4 years ago

Hello,

I followed what was in this wiki. When I tried this line python setup.py build_ext --compiler=mingw32 I got this error

(Glove3.6) c:\glove-python>python setup.py build_ext --compiler=mingw32 running build_ext Traceback (most recent call last): File "setup.py", line 155, in ext_modules=define_extensions() File "D:\Anaconda3\envs\Glove3.6\lib\site-packages\setuptools__init.py", line 144, in setup return distutils.core.setup(**attrs) File "D:\Anaconda3\envs\Glove3.6\lib\distutils\core.py", line 148, in setup dist.run_commands() File "D:\Anaconda3\envs\Glove3.6\lib\distutils\dist.py", line 955, in run_commands self.run_command(cmd) File "D:\Anaconda3\envs\Glove3.6\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "D:\Anaconda3\envs\Glove3.6\lib\site-packages\setuptools\command\build_ext.py", line 87, in run _build_ext.run(self) File "D:\Anaconda3\envs\Glove3.6\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run _build_ext.build_ext.run(self) File "D:\Anaconda3\envs\Glove3.6\lib\distutils\command\build_ext.py", line 308, in run force=self.force) File "D:\Anaconda3\envs\Glove3.6\lib\distutils\ccompiler.py", line 1031, in new_compiler return klass(None, dry_run, force) File "D:\Anaconda3\envs\Glove3.6\lib\distutils\cygwinccompiler.py", line 285, in init CygwinCCompiler.init__ (self, verbose, dry_run, force) File "D:\Anaconda3\envs\Glove3.6\lib\distutils\cygwinccompiler.py", line 129, in init if self.ld_version >= "2.10.90": TypeError: '>=' not supported between instances of 'NoneType' and 'str'

Kindly advise me what to do.

Here is my conda list

(Glove3.6) c:\glove-python>conda list

packages in environment at D:\Anaconda3\envs\Glove3.6:

#

Name Version Build Channel

atomicwrites 1.3.0 py36_1 attrs 19.3.0 py_0 blas 1.0 mkl ca-certificates 2020.1.1 0 certifi 2019.11.28 py36_0 colorama 0.4.3 py_0 cycler 0.10.0 py36h009560c_0 cython 0.29.15 py36ha925a31_0 freetype 2.9.1 ha9979f8_1 icc_rt 2019.0.0 h0cc432a_1 icu 58.2 ha66f8fd_1 implicit 0.4.2 py36he350917_0 conda-forge importlib_metadata 1.5.0 py36_0 intel-openmp 2020.0 166 jpeg 9b hb83a4c4_2 kiwisolver 1.1.0 py36ha925a31_0 libpng 1.6.37 h2a8f88b_0 libpython 2.1 py36_0 matplotlib 3.1.3 py36_0 matplotlib-base 3.1.3 py36h64f37c6_0 mkl 2020.0 166 mkl-service 2.3.0 py36hb782905_0 mkl_fft 1.0.15 py36h14836fe_0 mkl_random 1.1.0 py36h675688f_0 more-itertools 8.2.0 py_0 numpy 1.18.1 py36h93ca92e_0 numpy-base 1.18.1 py36hc3f5095_1 openssl 1.1.1d he774522_4 packaging 20.1 py_0 pip 20.0.2 py36_1 pluggy 0.13.1 py36_0 py 1.8.1 py_0 pyparsing 2.4.6 py_0 pyqt 5.9.2 py36h6538335_2 pytest 5.3.5 py36_0 python 3.6.10 h9f7ef89_0 python-dateutil 2.8.1 py_0 qt 5.9.7 vc14h73c81de_0 scipy 1.4.1 py36h9439919_0 setuptools 45.2.0 py36_0 sip 4.19.8 py36h6538335_0 six 1.14.0 py36_0 sqlite 3.31.1 he774522_0 tornado 6.0.3 py36he774522_3 tqdm 4.43.0 py_0 conda-forge vc 14.1 h0510ff6_4 vs2015_runtime 14.16.27012 hf0eaf9b_1 wcwidth 0.1.8 py_0 wheel 0.34.2 py36_0 wincertstore 0.2 py36h7fe50ca_0 zipp 2.2.0 py_0 zlib 1.2.11 h62dcd97_3

sheilaabad commented 4 years ago

Hello,

I followed what was in this wiki. When I tried this line python setup.py build_ext --compiler=mingw32 I got this error

(Glove3.6) c:\glove-python>python setup.py build_ext --compiler=mingw32 running build_ext Traceback (most recent call last): File "setup.py", line 155, in ext_modules=define_extensions() File "D:\Anaconda3\envs\Glove3.6\lib\site-packages\setuptoolsinit.py", line 144, in setup return distutils.core.setup(attrs) File "D:\Anaconda3\envs\Glove3.6\lib\distutils\core.py", line 148, in setup dist.run_commands() File "D:\Anaconda3\envs\Glove3.6\lib\distutils\dist.py", line 955, in run_commands self.run_command(cmd) File "D:\Anaconda3\envs\Glove3.6\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "D:\Anaconda3\envs\Glove3.6\lib\site-packages\setuptools\command\build_ext.py", line 87, in run _build_ext.run(self) File "D:\Anaconda3\envs\Glove3.6\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run _build_ext.build_ext.run(self) File "D:\Anaconda3\envs\Glove3.6\lib\distutils\command\build_ext.py", line 308, in run force=self.force) File "D:\Anaconda3\envs\Glove3.6\lib\distutils\ccompiler.py", line 1031, in new_compiler return klass(None, dry_run, force) File "D:\Anaconda3\envs\Glove3.6\lib\distutils\cygwinccompiler.py", line 285, in init CygwinCCompiler.init (self, verbose, dry_run, force) File "D:\Anaconda3\envs\Glove3.6\lib\distutils\cygwinccompiler.py", line 129, in init** if self.ld_version >= "2.10.90": TypeError: '>=' not supported between instances of 'NoneType' and 'str'

Kindly advise me what to do.

Here is my conda list

(Glove3.6) c:\glove-python>conda list

packages in environment at D:\Anaconda3\envs\Glove3.6:

Name Version Build Channel

atomicwrites 1.3.0 py36_1 attrs 19.3.0 py_0 blas 1.0 mkl ca-certificates 2020.1.1 0 certifi 2019.11.28 py36_0 colorama 0.4.3 py_0 cycler 0.10.0 py36h009560c_0 cython 0.29.15 py36ha925a31_0 freetype 2.9.1 ha9979f8_1 icc_rt 2019.0.0 h0cc432a_1 icu 58.2 ha66f8fd_1 implicit 0.4.2 py36he350917_0 conda-forge importlib_metadata 1.5.0 py36_0 intel-openmp 2020.0 166 jpeg 9b hb83a4c4_2 kiwisolver 1.1.0 py36ha925a31_0 libpng 1.6.37 h2a8f88b_0 libpython 2.1 py36_0 matplotlib 3.1.3 py36_0 matplotlib-base 3.1.3 py36h64f37c6_0 mkl 2020.0 166 mkl-service 2.3.0 py36hb782905_0 mkl_fft 1.0.15 py36h14836fe_0 mkl_random 1.1.0 py36h675688f_0 more-itertools 8.2.0 py_0 numpy 1.18.1 py36h93ca92e_0 numpy-base 1.18.1 py36hc3f5095_1 openssl 1.1.1d he774522_4 packaging 20.1 py_0 pip 20.0.2 py36_1 pluggy 0.13.1 py36_0 py 1.8.1 py_0 pyparsing 2.4.6 py_0 pyqt 5.9.2 py36h6538335_2 pytest 5.3.5 py36_0 python 3.6.10 h9f7ef89_0 python-dateutil 2.8.1 py_0 qt 5.9.7 vc14h73c81de_0 scipy 1.4.1 py36h9439919_0 setuptools 45.2.0 py36_0 sip 4.19.8 py36h6538335_0 six 1.14.0 py36_0 sqlite 3.31.1 he774522_0 tornado 6.0.3 py36he774522_3 tqdm 4.43.0 py_0 conda-forge vc 14.1 h0510ff6_4 vs2015_runtime 14.16.27012 hf0eaf9b_1 wcwidth 0.1.8 py_0 wheel 0.34.2 py36_0 wincertstore 0.2 py36h7fe50ca_0 zipp 2.2.0 py_0 zlib 1.2.11 h62dcd97_3

Here is my complete documentation of what happened

Errors when attempting to install glove_python.docx

IronFarm commented 4 years ago

@sheilaabad your stacktrace suggests its using the Cygwin compiler, not MinGW.

Are you using the Cygwin command prompt to compile it? I see in your .docx file that you ran where gcc.exe in the normal Windows command prompt but ran the build_ext command from a different prompt.

What happens if you run where gcc.exe immediately before running python setup.py build_ext --compiler=mingw32?

raghunaren commented 2 years ago

@IronFarm - Thanks for providing support with glove installation. I am facing a similar issue like the one above, while trying to run build_ext. Here's my log

C:\Program Files\Python39\lib\site-packages\setuptools\dist.py:717: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead warnings.warn( running build_ext Traceback (most recent call last): File "C:\ML\glove-python-master\setup.py", line 138, in setup( File "C:\Program Files\Python39\lib\site-packages\setuptools__init.py", line 153, in setup return distutils.core.setup(**attrs) File "C:\Program Files\Python39\lib\distutils\core.py", line 148, in setup dist.run_commands() File "C:\Program Files\Python39\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "C:\Program Files\Python39\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Program Files\Python39\lib\site-packages\setuptools\command\build_ext.py", line 79, in run _build_ext.run(self) File "C:\Program Files\Python39\lib\distutils\command\build_ext.py", line 306, in run self.compiler = new_compiler(compiler=self.compiler, File "C:\Program Files\Python39\lib\distutils\ccompiler.py", line 1032, in new_compiler return klass(None, dry_run, force) File "C:\Program Files\Python39\lib\distutils\cygwinccompiler.py", line 280, in init CygwinCCompiler.init__ (self, verbose, dry_run, force) File "C:\Program Files\Python39\lib\distutils\cygwinccompiler.py", line 155, in init self.dll_libraries = get_msvcr() File "C:\Program Files\Python39\lib\distutils\cygwinccompiler.py", line 84, in get_msvcr raise ValueError("Unknown MS Compiler version %s " % msc_ver) ValueError: Unknown MS Compiler version 1929

Really appreciate any help that you can extend.Thanks!

raghunaren commented 2 years ago

@IronFarm - I modified the command to python setup.py build_ext --inplace

This time it progressed a few steps before throwing one more series of errors

C:\Program Files\Python39\lib\site-packages\setuptools\dist.py:717: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead warnings.warn( running build_ext building 'glove.glove_cython' extension creating build creating build\temp.win-amd64-3.9 creating build\temp.win-amd64-3.9\Release creating build\temp.win-amd64-3.9\Release\glove C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Program Files\Python39\include -IC:\Program Files\Python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /Tcglove/glove_cython.c /Fobuild\temp.win-amd64-3.9\Release\glove/glove_cython.obj -fopenmp -ffast-math -march=native cl : Command line warning D9002 : ignoring unknown option '-fopenmp' cl : Command line warning D9002 : ignoring unknown option '-ffast-math' cl : Command line warning D9002 : ignoring unknown option '-march=native' glove_cython.c glove/glove_cython.c(1692): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data glove/glove_cython.c(1701): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data glove/glove_cython.c(2348): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data glove/glove_cython.c(2357): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data glove/glove_cython.c(15114): warning C4996: 'PyEval_InitThreads': deprecated in 3.9 glove/glove_cython.c(15221): error C2039: 'tp_print': is not a member of '_typeobject' C:\Program Files\Python39\include\cpython/object.h(193): note: see declaration of '_typeobject' glove/glove_cython.c(15224): error C2039: 'tp_print': is not a member of '_typeobject' C:\Program Files\Python39\include\cpython/object.h(193): note: see declaration of '_typeobject' glove/glove_cython.c(15235): error C2039: 'tp_print': is not a member of '_typeobject' C:\Program Files\Python39\include\cpython/object.h(193): note: see declaration of '_typeobject' glove/glove_cython.c(15244): error C2039: 'tp_print': is not a member of '_typeobject' C:\Program Files\Python39\include\cpython/object.h(193): note: see declaration of '_typeobject' glove/glove_cython.c(15587): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3 glove/glove_cython.c(15603): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3 glove/glove_cython.c(16714): warning C4996: 'PyUnicode_FromUnicode': deprecated in 3.3 glove/glove_cython.c(16753): error C2039: 'exc_type': is not a member of '_ts' C:\Program Files\Python39\include\cpython/pystate.h(49): note: see declaration of '_ts' glove/glove_cython.c(16754): error C2039: 'exc_value': is not a member of '_ts' C:\Program Files\Python39\include\cpython/pystate.h(49): note: see declaration of '_ts' glove/glove_cython.c(16755): error C2039: 'exc_traceback': is not a member of '_ts' C:\Program Files\Python39\include\cpython/pystate.h(49): note: see declaration of '_ts' glove/glove_cython.c(16767): error C2039: 'exc_type': is not a member of '_ts' C:\Program Files\Python39\include\cpython/pystate.h(49): note: see declaration of '_ts' glove/glove_cython.c(16768): error C2039: 'exc_value': is not a member of '_ts' C:\Program Files\Python39\include\cpython/pystate.h(49): note: see declaration of '_ts' glove/glove_cython.c(16769): error C2039: 'exc_traceback': is not a member of '_ts' C:\Program Files\Python39\include\cpython/pystate.h(49): note: see declaration of '_ts' glove/glove_cython.c(16770): error C2039: 'exc_type': is not a member of '_ts' C:\Program Files\Python39\include\cpython/pystate.h(49): note: see declaration of '_ts' glove/glove_cython.c(16771): error C2039: 'exc_value': is not a member of '_ts' C:\Program Files\Python39\include\cpython/pystate.h(49): note: see declaration of '_ts' glove/glove_cython.c(16772): error C2039: 'exc_traceback': is not a member of '_ts' C:\Program Files\Python39\include\cpython/pystate.h(49): note: see declaration of '_ts' glove/glove_cython.c(16815): error C2039: 'exc_type': is not a member of '_ts' C:\Program Files\Python39\include\cpython/pystate.h(49): note: see declaration of '_ts' glove/glove_cython.c(16816): error C2039: 'exc_value': is not a member of '_ts' C:\Program Files\Python39\include\cpython/pystate.h(49): note: see declaration of '_ts' glove/glove_cython.c(16817): error C2039: 'exc_traceback': is not a member of '_ts' C:\Program Files\Python39\include\cpython/pystate.h(49): note: see declaration of '_ts' glove/glove_cython.c(16818): error C2039: 'exc_type': is not a member of '_ts' C:\Program Files\Python39\include\cpython/pystate.h(49): note: see declaration of '_ts' glove/glove_cython.c(16819): error C2039: 'exc_value': is not a member of '_ts' C:\Program Files\Python39\include\cpython/pystate.h(49): note: see declaration of '_ts' glove/glove_cython.c(16820): error C2039: 'exc_traceback': is not a member of '_ts' C:\Program Files\Python39\include\cpython/pystate.h(49): note: see declaration of '_ts' glove/glove_cython.c(16842): error C2039: 'exc_type': is not a member of '_ts' C:\Program Files\Python39\include\cpython/pystate.h(49): note: see declaration of '_ts' glove/glove_cython.c(16843): error C2039: 'exc_value': is not a member of '_ts' C:\Program Files\Python39\include\cpython/pystate.h(49): note: see declaration of '_ts' glove/glove_cython.c(16844): error C2039: 'exc_traceback': is not a member of '_ts' C:\Program Files\Python39\include\cpython/pystate.h(49): note: see declaration of '_ts' glove/glove_cython.c(16845): error C2039: 'exc_type': is not a member of '_ts' C:\Program Files\Python39\include\cpython/pystate.h(49): note: see declaration of '_ts' glove/glove_cython.c(16846): error C2039: 'exc_value': is not a member of '_ts' C:\Program Files\Python39\include\cpython/pystate.h(49): note: see declaration of '_ts' glove/glove_cython.c(16847): error C2039: 'exc_traceback': is not a member of '_ts' C:\Program Files\Python39\include\cpython/pystate.h(49): note: see declaration of '_ts' error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2

raghunaren commented 2 years ago

@IronFarm - I finally installed glove-python. There was a subtle change that I had to do in the setup.py file. had to remove stdc++ entry (including the double quotes) from libraries Thanks for your steps on the installation. Couldn't have done without it.