vi3k6i5 / GuidedLDA

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

macos pyenv 3.7.3 pip install error #30

Closed andrzejd-pl closed 5 years ago

andrzejd-pl commented 5 years ago

hi, I wanna install this package by pip manager but execution command (pip install guidedlda) return error

Collecting guidedlda
  Downloading https://files.pythonhosted.org/packages/f8/ee/6d6e2b3525388399e12a4482554c7529a5fcf5e99c50a60abaa02894b8bf/guidedlda-2.0.0.dev22.tar.gz (2.1MB)
     |████████████████████████████████| 2.1MB 592kB/s
Requirement already satisfied: numpy in /Users/user/.pyenv/versions/3.7.3/lib/python3.7/site-packages (from guidedlda) (1.16.3)
Installing collected packages: guidedlda
  Running setup.py install for guidedlda ... error
    ERROR: Complete output from command /Users/user/.pyenv/versions/3.7.3/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/3_/53kvmk1x3jsc6d0zgqz1pfp80000gp/T/pip-install-gu49hipt/guidedlda/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/3_/53kvmk1x3jsc6d0zgqz1pfp80000gp/T/pip-record-n9y57vk2/install-record.txt --single-version-externally-managed --compile:
    ERROR: running install
    [pbr] Generating AUTHORS
    [pbr] AUTHORS complete (0.0s)
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.14-x86_64-3.7
    creating build/lib.macosx-10.14-x86_64-3.7/guidedlda
    copying guidedlda/_setup_hooks.py -> build/lib.macosx-10.14-x86_64-3.7/guidedlda
    copying guidedlda/datasets.py -> build/lib.macosx-10.14-x86_64-3.7/guidedlda
    copying guidedlda/guidedlda.py -> build/lib.macosx-10.14-x86_64-3.7/guidedlda
    copying guidedlda/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/guidedlda
    copying guidedlda/utils.py -> build/lib.macosx-10.14-x86_64-3.7/guidedlda
    creating build/lib.macosx-10.14-x86_64-3.7/guidedlda/tests
    copying guidedlda/tests/test_utils.py -> build/lib.macosx-10.14-x86_64-3.7/guidedlda/tests
    copying guidedlda/tests/test_datasets.py -> build/lib.macosx-10.14-x86_64-3.7/guidedlda/tests
    copying guidedlda/tests/test_lda.py -> build/lib.macosx-10.14-x86_64-3.7/guidedlda/tests
    copying guidedlda/tests/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/guidedlda/tests
    copying guidedlda/tests/test_lda_reuters.py -> build/lib.macosx-10.14-x86_64-3.7/guidedlda/tests
    copying guidedlda/tests/test_guidedlda_nyt.py -> build/lib.macosx-10.14-x86_64-3.7/guidedlda/tests
    copying guidedlda/tests/test_lda_transform.py -> build/lib.macosx-10.14-x86_64-3.7/guidedlda/tests
    copying guidedlda/tests/test_lda_sparse.py -> build/lib.macosx-10.14-x86_64-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.macosx-10.14-x86_64-3.7/guidedlda
    copying guidedlda/_guidedlda.pyx -> build/lib.macosx-10.14-x86_64-3.7/guidedlda
    copying guidedlda/gamma.c -> build/lib.macosx-10.14-x86_64-3.7/guidedlda
    copying guidedlda/gamma.h -> build/lib.macosx-10.14-x86_64-3.7/guidedlda
    copying guidedlda/tests/nyt.ldac -> build/lib.macosx-10.14-x86_64-3.7/guidedlda/tests
    copying guidedlda/tests/nyt.titles -> build/lib.macosx-10.14-x86_64-3.7/guidedlda/tests
    copying guidedlda/tests/nyt.tokens -> build/lib.macosx-10.14-x86_64-3.7/guidedlda/tests
    copying guidedlda/tests/reuters.ldac -> build/lib.macosx-10.14-x86_64-3.7/guidedlda/tests
    copying guidedlda/tests/reuters.titles -> build/lib.macosx-10.14-x86_64-3.7/guidedlda/tests
    copying guidedlda/tests/reuters.tokens -> build/lib.macosx-10.14-x86_64-3.7/guidedlda/tests
    running build_ext
    building 'guidedlda._guidedlda' extension
    creating build/temp.macosx-10.14-x86_64-3.7
    creating build/temp.macosx-10.14-x86_64-3.7/guidedlda
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/user/.pyenv/versions/3.7.3/include/python3.7m -c guidedlda/_guidedlda.c -o build/temp.macosx-10.14-x86_64-3.7/guidedlda/_guidedlda.o
    guidedlda/_guidedlda.c:1944:13: warning: code will never be executed [-Wunreachable-code]
      __pyx_r = 0;
                ^
    guidedlda/_guidedlda.c:18745:21: error: no member named 'exc_type' in 'struct _ts'
        *type = tstate->exc_type;
                ~~~~~~  ^
    guidedlda/_guidedlda.c:18746:22: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        *value = tstate->exc_value;
                         ^~~~~~~~~
                         curexc_value
    /Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    guidedlda/_guidedlda.c:18747:19: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        *tb = tstate->exc_traceback;
                      ^~~~~~~~~~~~~
                      curexc_traceback
    /Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    guidedlda/_guidedlda.c:18754:24: error: no member named 'exc_type' in 'struct _ts'
        tmp_type = tstate->exc_type;
                   ~~~~~~  ^
    guidedlda/_guidedlda.c:18755:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tmp_value = tstate->exc_value;
                            ^~~~~~~~~
                            curexc_value
    /Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    guidedlda/_guidedlda.c:18756:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tmp_tb = tstate->exc_traceback;
                         ^~~~~~~~~~~~~
                         curexc_traceback
    /Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    guidedlda/_guidedlda.c:18757:13: error: no member named 'exc_type' in 'struct _ts'
        tstate->exc_type = type;
        ~~~~~~  ^
    guidedlda/_guidedlda.c:18758:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tstate->exc_value = value;
                ^~~~~~~~~
                curexc_value
    /Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    guidedlda/_guidedlda.c:18759:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tstate->exc_traceback = tb;
                ^~~~~~~~~~~~~
                curexc_traceback
    /Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    guidedlda/_guidedlda.c:18814:24: error: no member named 'exc_type' in 'struct _ts'
        tmp_type = tstate->exc_type;
                   ~~~~~~  ^
    guidedlda/_guidedlda.c:18815:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tmp_value = tstate->exc_value;
                            ^~~~~~~~~
                            curexc_value
    /Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    guidedlda/_guidedlda.c:18816:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tmp_tb = tstate->exc_traceback;
                         ^~~~~~~~~~~~~
                         curexc_traceback
    /Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    guidedlda/_guidedlda.c:18817:13: error: no member named 'exc_type' in 'struct _ts'
        tstate->exc_type = local_type;
        ~~~~~~  ^
    guidedlda/_guidedlda.c:18818:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tstate->exc_value = local_value;
                ^~~~~~~~~
                curexc_value
    /Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    guidedlda/_guidedlda.c:18819:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tstate->exc_traceback = local_tb;
                ^~~~~~~~~~~~~
                curexc_traceback
    /Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    guidedlda/_guidedlda.c:18841:24: error: no member named 'exc_type' in 'struct _ts'
        tmp_type = tstate->exc_type;
                   ~~~~~~  ^
    guidedlda/_guidedlda.c:18842:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tmp_value = tstate->exc_value;
                            ^~~~~~~~~
                            curexc_value
    /Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    guidedlda/_guidedlda.c:18843:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tmp_tb = tstate->exc_traceback;
                         ^~~~~~~~~~~~~
                         curexc_traceback
    /Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    guidedlda/_guidedlda.c:18844:13: error: no member named 'exc_type' in 'struct _ts'
        tstate->exc_type = *type;
        ~~~~~~  ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    1 warning and 20 errors generated.
    error: command 'clang' failed with exit status 1
    ----------------------------------------
ERROR: Command "/Users/user/.pyenv/versions/3.7.3/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/3_/53kvmk1x3jsc6d0zgqz1pfp80000gp/T/pip-install-gu49hipt/guidedlda/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/3_/53kvmk1x3jsc6d0zgqz1pfp80000gp/T/pip-record-n9y57vk2/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/3_/53kvmk1x3jsc6d0zgqz1pfp80000gp/T/pip-install-gu49hipt/guidedlda/

I try to compile this repo but sh build_dist.sh return the same problem:

find guidedlda -name "*.pyx" -exec cython {} \;
find: cython: No such file or directory
Ok to continue (y/n)? y
Building distribution
running clean
removing 'build/temp.macosx-10.14-x86_64-3.7' (and everything under it)
removing 'build'
running build_ext
building 'guidedlda._guidedlda' extension
creating build
creating build/temp.macosx-10.14-x86_64-3.7
creating build/temp.macosx-10.14-x86_64-3.7/guidedlda
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/user/.pyenv/versions/3.7.3/include/python3.7m -c guidedlda/_guidedlda.c -o build/temp.macosx-10.14-x86_64-3.7/guidedlda/_guidedlda.o
guidedlda/_guidedlda.c:1944:13: warning: code will never be executed [-Wunreachable-code]
  __pyx_r = 0;
            ^
guidedlda/_guidedlda.c:18745:21: error: no member named 'exc_type' in 'struct _ts'
    *type = tstate->exc_type;
            ~~~~~~  ^
guidedlda/_guidedlda.c:18746:22: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
    *value = tstate->exc_value;
                     ^~~~~~~~~
                     curexc_value
/Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
    PyObject *curexc_value;
              ^
guidedlda/_guidedlda.c:18747:19: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
    *tb = tstate->exc_traceback;
                  ^~~~~~~~~~~~~
                  curexc_traceback
/Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
    PyObject *curexc_traceback;
              ^
guidedlda/_guidedlda.c:18754:24: error: no member named 'exc_type' in 'struct _ts'
    tmp_type = tstate->exc_type;
               ~~~~~~  ^
guidedlda/_guidedlda.c:18755:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
    tmp_value = tstate->exc_value;
                        ^~~~~~~~~
                        curexc_value
/Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
    PyObject *curexc_value;
              ^
guidedlda/_guidedlda.c:18756:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
    tmp_tb = tstate->exc_traceback;
                     ^~~~~~~~~~~~~
                     curexc_traceback
/Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
    PyObject *curexc_traceback;
              ^
guidedlda/_guidedlda.c:18757:13: error: no member named 'exc_type' in 'struct _ts'
    tstate->exc_type = type;
    ~~~~~~  ^
guidedlda/_guidedlda.c:18758:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
    tstate->exc_value = value;
            ^~~~~~~~~
            curexc_value
/Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
    PyObject *curexc_value;
              ^
guidedlda/_guidedlda.c:18759:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
    tstate->exc_traceback = tb;
            ^~~~~~~~~~~~~
            curexc_traceback
/Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
    PyObject *curexc_traceback;
              ^
guidedlda/_guidedlda.c:18814:24: error: no member named 'exc_type' in 'struct _ts'
    tmp_type = tstate->exc_type;
               ~~~~~~  ^
guidedlda/_guidedlda.c:18815:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
    tmp_value = tstate->exc_value;
                        ^~~~~~~~~
                        curexc_value
/Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
    PyObject *curexc_value;
              ^
guidedlda/_guidedlda.c:18816:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
    tmp_tb = tstate->exc_traceback;
                     ^~~~~~~~~~~~~
                     curexc_traceback
/Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
    PyObject *curexc_traceback;
              ^
guidedlda/_guidedlda.c:18817:13: error: no member named 'exc_type' in 'struct _ts'
    tstate->exc_type = local_type;
    ~~~~~~  ^
guidedlda/_guidedlda.c:18818:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
    tstate->exc_value = local_value;
            ^~~~~~~~~
            curexc_value
/Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
    PyObject *curexc_value;
              ^
guidedlda/_guidedlda.c:18819:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
    tstate->exc_traceback = local_tb;
            ^~~~~~~~~~~~~
            curexc_traceback
/Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
    PyObject *curexc_traceback;
              ^
guidedlda/_guidedlda.c:18841:24: error: no member named 'exc_type' in 'struct _ts'
    tmp_type = tstate->exc_type;
               ~~~~~~  ^
guidedlda/_guidedlda.c:18842:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
    tmp_value = tstate->exc_value;
                        ^~~~~~~~~
                        curexc_value
/Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
    PyObject *curexc_value;
              ^
guidedlda/_guidedlda.c:18843:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
    tmp_tb = tstate->exc_traceback;
                     ^~~~~~~~~~~~~
                     curexc_traceback
/Users/user/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
    PyObject *curexc_traceback;
              ^
guidedlda/_guidedlda.c:18844:13: error: no member named 'exc_type' in 'struct _ts'
    tstate->exc_type = *type;
    ~~~~~~  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
error: command 'clang' failed with exit status 1

My python environment:

$pyenv --version
pyenv 1.2.11
$pyenv versions
  system
  2.7.15
  3.7.2
* 3.7.3 (set by /Users/user/Downloads/GuidedLDA/.python-version)

my os version:

$system_profiler SPSoftwareDataType
Software:

    System Software Overview:

      System Version: macOS 10.14.4 (18E226)
      Kernel Version: Darwin 18.5.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      Computer Name: my-mac
      User Name: user (user)
      Secure Virtual Memory: Enabled
      System Integrity Protection: Enabled
      Time since boot: 3 days 14:59
andrzejd-pl commented 5 years ago

ok, so I run pip install Cython and execute commands from https://github.com/vi3k6i5/GuidedLDA#installation