vi3k6i5 / GuidedLDA

semi supervised guided topic model with custom guidedLDA
Mozilla Public License 2.0
499 stars 110 forks source link

installation error #26

Open jdgride opened 5 years ago

jdgride commented 5 years ago

Having an issue installing this package using pip. The following is the entire output:

pip install guidedlda Collecting guidedlda Using cached https://files.pythonhosted.org/packages/f8/ee/6d6e2b3525388399e12a4482554c7529a5fcf5e99c50a60abaa02894b8bf/guidedlda-2.0.0.dev22.tar.gz Requirement already satisfied: numpy in c:\users\450226\documents\nlp\venv\lib\site-packages (from guidedlda) (1.16.2) Building wheels for collected packages: guidedlda Building wheel for guidedlda (setup.py) ... error Complete output from command C:\Users\450226\Documents\NLP\venv\Scripts\python.exe -u -c "import setuptools, tokenize;file='C:\Users\450226\AppData\Local\Temp\pip-install-egwznkv4\guidedlda\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(comp ile(code, file, 'exec'))" bdist_wheel -d C:\Users\450226\AppData\Local\Temp\pip-wheel-8udw_oro --python-tag cp37: running bdist_wheel running build running build_py creating build creating build\lib.win32-3.7 creating build\lib.win32-3.7\guidedlda copying guidedlda\datasets.py -> build\lib.win32-3.7\guidedlda copying guidedlda\guidedlda.py -> build\lib.win32-3.7\guidedlda copying guidedlda\utils.py -> build\lib.win32-3.7\guidedlda copying guidedlda_setup_hooks.py -> build\lib.win32-3.7\guidedlda copying guidedlda__init__.py -> build\lib.win32-3.7\guidedlda creating build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\test_datasets.py -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\test_guidedlda_nyt.py -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\test_lda.py -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\test_lda_reuters.py -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\test_lda_sparse.py -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\test_lda_transform.py -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\test_utils.py -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests__init__.py -> build\lib.win32-3.7\guidedlda\tests running egg_info writing guidedlda.egg-info\PKG-INFO writing dependency_links to guidedlda.egg-info\dependency_links.txt writing requirements to guidedlda.egg-info\requires.txt writing top-level names to guidedlda.egg-info\top_level.txt [pbr] Reusing existing SOURCES.txt copying guidedlda_guidedlda.c -> build\lib.win32-3.7\guidedlda copying guidedlda_guidedlda.pyx -> build\lib.win32-3.7\guidedlda copying guidedlda\gamma.c -> build\lib.win32-3.7\guidedlda copying guidedlda\gamma.h -> build\lib.win32-3.7\guidedlda copying guidedlda\tests\nyt.ldac -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\nyt.titles -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\nyt.tokens -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\reuters.ldac -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\reuters.titles -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\reuters.tokens -> build\lib.win32-3.7\guidedlda\tests running build_ext building 'guidedlda._guidedlda' extension creating build\temp.win32-3.7 creating build\temp.win32-3.7\Release creating build\temp.win32-3.7\Release\guidedlda C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\450226\Documents\NLP\venv\include -IC:\Users\450226\AppData\Local\Programs\Python\Python37-32\include -IC:\Users\450226\AppData\Local\Programs\Python\Pyt hon37-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcguidedlda/_guidedlda.c /Fobuild\temp.win32-3.7\Re lease\guidedlda/_guidedlda.obj _guidedlda.c guidedlda/_guidedlda.c(18745): error C2039: 'exc_type': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18746): error C2039: 'exc_value': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18747): error C2039: 'exc_traceback': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18754): error C2039: 'exc_type': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18755): error C2039: 'exc_value': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18756): error C2039: 'exc_traceback': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18757): error C2039: 'exc_type': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18758): error C2039: 'exc_value': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18759): error C2039: 'exc_traceback': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18814): error C2039: 'exc_type': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18815): error C2039: 'exc_value': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18816): error C2039: 'exc_traceback': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18817): error C2039: 'exc_type': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18818): error C2039: 'exc_value': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18819): error C2039: 'exc_traceback': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18841): error C2039: 'exc_type': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18842): error C2039: 'exc_value': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18843): error C2039: 'exc_traceback': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18844): error C2039: 'exc_type': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18845): error C2039: 'exc_value': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18846): error C2039: 'exc_traceback': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\cl.exe' failed with exit status 2


Failed building wheel for guidedlda Running setup.py clean for guidedlda Failed to build guidedlda Installing collected packages: guidedlda Running setup.py install for guidedlda ... error Complete output from command C:\Users\450226\Documents\NLP\venv\Scripts\python.exe -u -c "import setuptools, tokenize;file='C:\Users\450226\AppData\Local\Temp\pip-install-egwznkv4\guidedlda\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(co mpile(code, file, 'exec'))" install --record C:\Users\450226\AppData\Local\Temp\pip-record-7ic5u5or\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\450226\Documents\NLP\venv\include\site\python3.7\guidedlda: running install [pbr] Generating AUTHORS [pbr] AUTHORS complete (0.0s) running build running build_py creating build creating build\lib.win32-3.7 creating build\lib.win32-3.7\guidedlda creating build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\test_datasets.py -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\test_guidedlda_nyt.py -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\test_lda.py -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\test_lda_reuters.py -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\test_lda_sparse.py -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\test_lda_transform.py -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\test_utils.py -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests__init.py -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\datasets.py -> build\lib.win32-3.7\guidedlda copying guidedlda\guidedlda.py -> build\lib.win32-3.7\guidedlda copying guidedlda\utils.py -> build\lib.win32-3.7\guidedlda copying guidedlda_setup_hooks.py -> build\lib.win32-3.7\guidedlda copying guidedlda\init__.py -> build\lib.win32-3.7\guidedlda running egg_info writing guidedlda.egg-info\PKG-INFO writing dependency_links to guidedlda.egg-info\dependency_links.txt writing requirements to guidedlda.egg-info\requires.txt writing top-level names to guidedlda.egg-info\top_level.txt [pbr] Reusing existing SOURCES.txt copying guidedlda\tests\nyt.ldac -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\nyt.titles -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\nyt.tokens -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\reuters.ldac -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\reuters.titles -> build\lib.win32-3.7\guidedlda\tests copying guidedlda\tests\reuters.tokens -> build\lib.win32-3.7\guidedlda\tests copying guidedlda_guidedlda.c -> build\lib.win32-3.7\guidedlda copying guidedlda_guidedlda.pyx -> build\lib.win32-3.7\guidedlda copying guidedlda\gamma.c -> build\lib.win32-3.7\guidedlda copying guidedlda\gamma.h -> build\lib.win32-3.7\guidedlda running build_ext building 'guidedlda._guidedlda' extension creating build\temp.win32-3.7 creating build\temp.win32-3.7\Release creating build\temp.win32-3.7\Release\guidedlda C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\450226\Documents\NLP\venv\include -IC:\Users\450226\AppData\Local\Programs\Python\Python37-32\include -IC:\Users\450226\AppData\Local\Programs\Python\P ython37-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program File s (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcguidedlda/_guidedlda.c /Fobuild\temp.win32-3.7\ Release\guidedlda/_guidedlda.obj _guidedlda.c guidedlda/_guidedlda.c(18745): error C2039: 'exc_type': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18746): error C2039: 'exc_value': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18747): error C2039: 'exc_traceback': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18754): error C2039: 'exc_type': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18755): error C2039: 'exc_value': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18756): error C2039: 'exc_traceback': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18757): error C2039: 'exc_type': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18758): error C2039: 'exc_value': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18759): error C2039: 'exc_traceback': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18814): error C2039: 'exc_type': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18815): error C2039: 'exc_value': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18816): error C2039: 'exc_traceback': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18817): error C2039: 'exc_type': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18818): error C2039: 'exc_value': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18819): error C2039: 'exc_traceback': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18841): error C2039: 'exc_type': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18842): error C2039: 'exc_value': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18843): error C2039: 'exc_traceback': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18844): error C2039: 'exc_type': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18845): error C2039: 'exc_value': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' guidedlda/_guidedlda.c(18846): error C2039: 'exc_traceback': is not a member of '_ts' c:\users\450226\appdata\local\programs\python\python37-32\include\pystate.h(212): note: see declaration of '_ts' error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\cl.exe' failed with exit status 2

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

Command "C:\Users\450226\Documents\NLP\venv\Scripts\python.exe -u -c "import setuptools, tokenize;file='C:\Users\450226\AppData\Local\Temp\pip-install-egwznkv4\guidedlda\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'e xec'))" install --record C:\Users\450226\AppData\Local\Temp\pip-record-7ic5u5or\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\450226\Documents\NLP\venv\include\site\python3.7\guidedlda" failed with error code 1 in C:\Users\450226\AppData\Local\Temp\pip-install-egwznk v4\guidedlda\

Also, when I try the following: https://github.com/vi3k6i5/GuidedLDA cd GuidedLDA sh build_dist.sh python setup.py sdist pip install -e .

I get the error: 'https:' is not recognized as an internal or external command, operable program or batch file.

s-machine commented 5 years ago

Same error. I used my Python2.7 environment and installed withpip2 install guidedlda

enigammi commented 5 years ago

It seems the same problem I had (the output was slightly different because I was working on a Mac) I found this solution and explanation: https://github.com/SheffieldML/GPy/issues/649#issuecomment-410241513 Should be a Cython problem. I adapted the code this way git clone https://github.com/vi3k6i5/GuidedLDA/ find guidedlda -name '*.pyx' -exec cython {} \; pip install guidedlda And then everything worked. Hope it helps!

dataanalyst4lyfe commented 5 years ago

I'm a Windows 10 user, and I did something similar to what @enigammi recommended.

git clone https://github.com/vi3k6i5/GuidedLDA/
cython _guidedlda.pyx
pip install -e .

It was either cython _guidedlda.pyx or cython _guidedlda.pyx \;, I'm not sure which one was the "magic command," that worked. I just tried them both, before doing a pip install.

kushalc commented 5 years ago

Running on OS X 10.14 w/Python3.7. I encountered the same above errors, but was able to get past them by upgrading cython:

pip3 install -U cython

removing the following 2 lines from setup.cfg:

[sdist]
pre-hook.sdist_pre_hook = guidedlda._setup_hooks.sdist_pre_hook

and then running the original installation instructions:

git clone https://github.com/vi3k6i5/GuidedLDA
cd GuidedLDA
sh build_dist.sh
python setup.py sdist
pip3 install -e .
yasmineTYM commented 5 years ago

Running on OS X 10.14 w/Python3.7. I encountered the same above errors, but was able to get past them by upgrading cython:

pip3 install -U cython

removing the following 2 lines from setup.cfg:

[sdist]
pre-hook.sdist_pre_hook = guidedlda._setup_hooks.sdist_pre_hook

and then running the original installation instructions:

git clone https://github.com/vi3k6i5/GuidedLDA
cd GuidedLDA
sh build_dist.sh
python setup.py sdist
pip3 install -e .

It works for me !!! Thanks a lot

shassanin commented 5 years ago

Running on OS X 10.14 w/Python3.7. I encountered the same above errors, but was able to get past them by upgrading cython:

pip3 install -U cython

removing the following 2 lines from setup.cfg:

[sdist]
pre-hook.sdist_pre_hook = guidedlda._setup_hooks.sdist_pre_hook

and then running the original installation instructions:

git clone https://github.com/vi3k6i5/GuidedLDA
cd GuidedLDA
sh build_dist.sh
python setup.py sdist
pip3 install -e .

worked for me, too! Thank you very much!

fuyubo1996 commented 5 years ago

在OS X 10.14 w / Python3.7上运行。我遇到了相同的上述错误,但是能够通过升级cython来克服它们:

pip3 install -U cython

从setup.cfg中删除以下两行:

[sdist]
pre-hook.sdist_pre_hook = guidedlda._setup_hooks.sdist_pre_hook

然后运行原始安装说明:

git clone https://github.com/vi3k6i5/GuidedLDA
cd GuidedLDA
sh build_dist.sh
python setup.py sdist
pip3 install -e .

It's really useful. Thank you very much

JeevaGanesan commented 5 years ago

Running on OS X 10.14 w/Python3.7. I encountered the same above errors, but was able to get past them by upgrading cython:

pip3 install -U cython

removing the following 2 lines from setup.cfg:

[sdist]
pre-hook.sdist_pre_hook = guidedlda._setup_hooks.sdist_pre_hook

and then running the original installation instructions:

git clone https://github.com/vi3k6i5/GuidedLDA
cd GuidedLDA
sh build_dist.sh
python setup.py sdist
pip3 install -e .

This worked for me in Windows.. :) Thanks a lot.

benreaves commented 4 years ago

@kushalc worked for me too (Ubuntu Linux 4.4.0 on Windows 10 WSL, Python 3.7.4 installed 2/20/2020) but of course you must remove the lines from GuidedLDA/setup.cfg after the git clone not before :)

sys10m commented 4 years ago

Running on OS X 10.14 w/Python3.7. I encountered the same above errors, but was able to get past them by upgrading cython:

pip3 install -U cython

removing the following 2 lines from setup.cfg:

[sdist]
pre-hook.sdist_pre_hook = guidedlda._setup_hooks.sdist_pre_hook

and then running the original installation instructions:

git clone https://github.com/vi3k6i5/GuidedLDA
cd GuidedLDA
sh build_dist.sh
python setup.py sdist
pip3 install -e .

this works for me. thanks!!

Eva-devgirl commented 4 years ago

I tried to install guidedlda on ubuntu but it doesnt work.

 command: /home/evanthia/anaconda3/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/evanthia/GuidedLDA/setup.py'"'"'; __file__='"'"'/home/evanthia/GuidedLDA/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
     cwd: /home/evanthia/GuidedLDA/
Complete output (110 lines):
running develop
running egg_info
writing guidedlda.egg-info/PKG-INFO
writing dependency_links to guidedlda.egg-info/dependency_links.txt
writing requirements to guidedlda.egg-info/requires.txt
writing top-level names to guidedlda.egg-info/top_level.txt
writing pbr to guidedlda.egg-info/pbr.json
[pbr] Processing SOURCES.txt
[pbr] In git context, generating filelist from git
/home/evanthia/anaconda3/lib/python3.7/site-packages/setuptools/dist.py:46: DistDeprecationWarning: Do not call this function
  warnings.warn("Do not call this function", DistDeprecationWarning)
warning: no previously-included files found matching '.gitreview'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching '.gitignore'
warning: no files found matching 'guidedlda/tests/'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
writing manifest file 'guidedlda.egg-info/SOURCES.txt'
running build_ext
building 'guidedlda._guidedlda' extension
gcc -pthread -B /home/evanthia/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/evanthia/anaconda3/include/python3.7m -c guidedlda/_guidedlda.c -o build/temp.linux-x86_64-3.7/guidedlda/_guidedlda.o
guidedlda/_guidedlda.c: In function ‘__Pyx__ExceptionSave’:
guidedlda/_guidedlda.c:18745:21: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
     *type = tstate->exc_type;
                     ^~~~~~~~
                     curexc_type
guidedlda/_guidedlda.c:18746:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
     *value = tstate->exc_value;
                      ^~~~~~~~~
                      curexc_value
guidedlda/_guidedlda.c:18747:19: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
     *tb = tstate->exc_traceback;
                   ^~~~~~~~~~~~~
                   curexc_traceback
guidedlda/_guidedlda.c: In function ‘__Pyx__ExceptionReset’:
guidedlda/_guidedlda.c:18754:24: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
     tmp_type = tstate->exc_type;
                        ^~~~~~~~
                        curexc_type
guidedlda/_guidedlda.c:18755:25: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
     tmp_value = tstate->exc_value;
                         ^~~~~~~~~
                         curexc_value
guidedlda/_guidedlda.c:18756:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
     tmp_tb = tstate->exc_traceback;
                      ^~~~~~~~~~~~~
                      curexc_traceback
guidedlda/_guidedlda.c:18757:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
     tstate->exc_type = type;
             ^~~~~~~~
             curexc_type
guidedlda/_guidedlda.c:18758:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
     tstate->exc_value = value;
             ^~~~~~~~~
             curexc_value
guidedlda/_guidedlda.c:18759:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
     tstate->exc_traceback = tb;
             ^~~~~~~~~~~~~
             curexc_traceback
guidedlda/_guidedlda.c: In function ‘__Pyx__GetException’:
guidedlda/_guidedlda.c:18814:24: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
     tmp_type = tstate->exc_type;
                        ^~~~~~~~
                        curexc_type
guidedlda/_guidedlda.c:18815:25: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
     tmp_value = tstate->exc_value;
                         ^~~~~~~~~
                         curexc_value
guidedlda/_guidedlda.c:18816:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
     tmp_tb = tstate->exc_traceback;
                      ^~~~~~~~~~~~~
                      curexc_traceback
guidedlda/_guidedlda.c:18817:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
     tstate->exc_type = local_type;
             ^~~~~~~~
             curexc_type
guidedlda/_guidedlda.c:18818:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
     tstate->exc_value = local_value;
             ^~~~~~~~~
             curexc_value
guidedlda/_guidedlda.c:18819:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
     tstate->exc_traceback = local_tb;
             ^~~~~~~~~~~~~
             curexc_traceback
guidedlda/_guidedlda.c: In function ‘__Pyx__ExceptionSwap’:
guidedlda/_guidedlda.c:18841:24: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
     tmp_type = tstate->exc_type;
                        ^~~~~~~~
                        curexc_type
guidedlda/_guidedlda.c:18842:25: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
     tmp_value = tstate->exc_value;
                         ^~~~~~~~~
                         curexc_value
guidedlda/_guidedlda.c:18843:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
     tmp_tb = tstate->exc_traceback;
                      ^~~~~~~~~~~~~
                      curexc_traceback
guidedlda/_guidedlda.c:18844:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
     tstate->exc_type = *type;
             ^~~~~~~~
             curexc_type
guidedlda/_guidedlda.c:18845:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
     tstate->exc_value = *value;
             ^~~~~~~~~
             curexc_value
guidedlda/_guidedlda.c:18846: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 'gcc' failed with exit status 1
----------------------------------------

ERROR: Command errored out with exit status 1: /home/evanthia/anaconda3/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/evanthia/GuidedLDA/setup.py'"'"'; file='"'"'/home/evanthia/GuidedLDA/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

ThomasADuffy commented 4 years ago

I'm a Windows 10 user, and I did something similar to what @enigammi recommended.

git clone https://github.com/vi3k6i5/GuidedLDA/
cython _guidedlda.pyx
pip install -e .

It was either cython _guidedlda.pyx or cython _guidedlda.pyx \;, I'm not sure which one was the "magic command," that worked. I just tried them both, before doing a pip install.

Windows 10 and python 3.7 here. This worked for me, seems to be a compatibility issue between python 3.7 and cython .29

here is some simple steps that worked for me

  1. git clone the guidedlda repo linked

    git clone https://github.com/vi3k6i5/GuidedLDA/

  2. next open a terminal or powershell in admin mode then cd to the GuidedLDA directory you just cloned then run the command cython _guidedlda.pyx \

    cd (path to cloned GuidedLDA repo AND IN THE guidedlda FOLDER WITHIN THAT REPO so it should be GuidedLDA/guidedlda/) cython _guidedlda.pyx \

  3. then install GuidedLDA with pip with the local repo using the command pip install -e . (the . points to the current directory)

    pip install -e .

Thanks again!