Установка vowpalwabbit через pip выдает ошибку "целевой шаблон не содержит% ... рецепт для целевой цели не выполнен" - PullRequest
0 голосов
/ 10 февраля 2020

Я пытаюсь установить библиотеку vowpalwabbit в Python3 .7 виртуальной среде. Я получаю следующий вывод при попытке установить библиотеку с помощью pip (я получаю ту же ошибку, когда тоже не использую виртуальную среду, поэтому я не думаю, что проблема с виртуальной средой):

(vow) sanit@sanit-X:~/Documents/Work/ConBan$ pip install vowpalwabbit
Collecting vowpalwabbit
  Using cached vowpalwabbit-8.8.0.tar.gz (3.1 MB)
Installing collected packages: vowpalwabbit
    Running setup.py install for vowpalwabbit ... error
    ERROR: Command errored out with exit status 1:
     command: /home/sanit/Documents/Work/ConBan/vow/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bcdwz4bz/vowpalwabbit/setup.py'"'"'; __file__='"'"'/tmp/pip-install-bcdwz4bz/vowpalwabbit/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-5hyyiq95/install-record.txt --single-version-externally-managed --compile --install-headers /home/sanit/Documents/Work/ConBan/vow/include/site/python3.7/vowpalwabbit
         cwd: /tmp/pip-install-bcdwz4bz/vowpalwabbit/
    Complete output (178 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.7
    creating build/lib.linux-x86_64-3.7/vowpalwabbit
    copying python/vowpalwabbit/pyvw.py -> build/lib.linux-x86_64-3.7/vowpalwabbit
    copying python/vowpalwabbit/__init__.py -> build/lib.linux-x86_64-3.7/vowpalwabbit
    copying python/vowpalwabbit/sklearn_vw.py -> build/lib.linux-x86_64-3.7/vowpalwabbit
    running egg_info
    writing python/vowpalwabbit.egg-info/PKG-INFO
    writing dependency_links to python/vowpalwabbit.egg-info/dependency_links.txt
    writing top-level names to python/vowpalwabbit.egg-info/top_level.txt
    reading manifest file 'python/vowpalwabbit.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching 'python/*.dll' under directory 'python/bin'
    warning: no files found matching 'python/packages.config' under directory 'python/windows*'
    warning: no files found matching 'python/*.vcxproj*' under directory 'python/windows*'
    warning: no previously-included files matching '*.o' found anywhere in distribution
    warning: no previously-included files matching '*.exe' found anywhere in distribution
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '*' found under directory 'vowpalwabbit/.nuget'
    warning: no previously-included files matching '*' found under directory 'vowpalwabbit/slim'
    writing manifest file 'python/vowpalwabbit.egg-info/SOURCES.txt'
    copying python/vowpalwabbit/conda_install.sh -> build/lib.linux-x86_64-3.7/vowpalwabbit
    running build_ext
    creating build/temp.linux-x86_64-3.7
    cmake -DCMAKE_BUILD_TYPE=Release -DPY_VERSION=3.7 -DBUILD_PYTHON=On -DBUILD_TESTS=Off -DWARNINGS=Off -DBoost_NO_BOOST_CMAKE=ON -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-bcdwz4bz/vowpalwabbit/build/lib.linux-x86_64-3.7 /tmp/pip-install-bcdwz4bz/vowpalwabbit
    -- VowpalWabbit Version: 8.8.0
    -- The CXX compiler identification is GNU 5.4.0
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Number of processors: 8
    -- Looking for C++ include pthread.h
    -- Looking for C++ include pthread.h - found
    -- Looking for pthread_create
    -- Looking for pthread_create - not found
    -- Check if compiler accepts -pthread
    -- Check if compiler accepts -pthread - yes
    -- Found Threads: TRUE
    -- Boost version: 1.58.0
    -- Found the following Boost libraries:
    --   program_options
    --   system
    --   thread
    --   unit_test_framework
    --   chrono
    --   date_time
    --   atomic
    -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
    -- help2man not found, please install it to generate manpages
    -- Python 3.7 will be used for VowpalWabbit Python bindings
    -- Found PythonInterp: /home/sanit/Documents/Work/ConBan/vow/bin/python3.7 (found suitable version "3.7.6", minimum required is "3.7")
    -- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.7m.so (found suitable version "3.7.6", minimum required is "3.7")
    -- Boost version: 1.58.0
    -- Found the following Boost libraries:
    --   system
    --   python3
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /tmp/pip-install-bcdwz4bz/vowpalwabbit/build/temp.linux-x86_64-3.7
    cmake --build . --config Release -- -j8 pylibvw
    Scanning dependencies of target allreduce
    [  1%] Building CXX object vowpalwabbit/CMakeFiles/allreduce.dir/vw_exception.cc.o
    [  1%] Building CXX object vowpalwabbit/CMakeFiles/allreduce.dir/allreduce_threads.cc.o
    [  2%] Building CXX object vowpalwabbit/CMakeFiles/allreduce.dir/allreduce_sockets.cc.o
    [  3%] Linking CXX static library liballreduce.a
    [  3%] Built target allreduce
    Scanning dependencies of target vw
    [  7%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/audit_regressor.cc.o
    [  7%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/action_score.cc.o
    [  6%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/autolink.cc.o
    [  7%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/active_cover.cc.o
    [  8%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/baseline.cc.o
    [ 10%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/accumulate.cc.o
    [ 11%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/active.cc.o
    [ 12%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/best_constant.cc.o
    [ 12%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/bfgs.cc.o
    [ 13%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/binary.cc.o
    [ 15%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/boosting.cc.o
    [ 16%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/bs.cc.o
    [ 17%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/cb_adf.cc.o
    [ 17%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/cache.cc.o
    [ 18%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/cb_explore_adf_cover.cc.o
    [ 20%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/cb_algs.cc.o
    [ 21%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/cb_explore_adf_bag.cc.o
    [ 21%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/cb_explore_adf_first.cc.o
    [ 22%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/cb_explore_adf_greedy.cc.o
    [ 23%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/cb_explore_adf_regcb.cc.o
    [ 25%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/cb_explore_adf_softmax.cc.o
    [ 26%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/cb_explore.cc.o
    [ 26%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/cb_sample.cc.o
    [ 27%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/cb.cc.o
    [ 28%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/cbify.cc.o
    [ 30%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/ccb_label.cc.o
    [ 30%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/classweight.cc.o
    [ 31%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/comp_io.cc.o
    [ 32%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/conditional_contextual_bandit.cc.o
    [ 33%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/confidence.cc.o
    [ 35%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/cost_sensitive.cc.o
    [ 35%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/cs_active.cc.o
    [ 36%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/csoaa.cc.o
    [ 37%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/ect.cc.o
    [ 38%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/example.cc.o
    [ 40%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/explore_eval.cc.o
    [ 40%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/ftrl.cc.o
    [ 41%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/gd_mf.cc.o
    [ 42%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/gd.cc.o
    [ 43%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/gen_cs_example.cc.o
    [ 43%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/global_data.cc.o
    [ 45%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/interact.cc.o
    [ 46%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/interactions.cc.o
    [ 47%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/io_buf.cc.o
    [ 48%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/kernel_svm.cc.o
    [ 48%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/label_dictionary.cc.o
    [ 50%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/lda_core.cc.o
    [ 51%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/learner.cc.o
    [ 52%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/log_multi.cc.o
    [ 52%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/loss_functions.cc.o
    [ 53%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/lrq.cc.o
    [ 55%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/lrqfa.cc.o
    [ 56%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/marginal.cc.o
    [ 57%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/memory_tree.cc.o
    [ 57%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/mf.cc.o
    [ 58%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/multiclass.cc.o
    [ 60%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/multilabel_oaa.cc.o
    [ 61%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/multilabel.cc.o
    [ 61%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/mwt.cc.o
    [ 62%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/network.cc.o
    [ 63%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/nn.cc.o
    [ 65%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/no_label.cc.o
    [ 66%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/noop.cc.o
    [ 66%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/oaa.cc.o
    [ 67%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/OjaNewton.cc.o
    [ 68%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/options_boost_po.cc.o
    [ 70%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/options_serializer_boost_po.cc.o
    [ 71%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/parse_args.cc.o
    [ 71%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/parse_example.cc.o
    [ 72%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/parse_primitives.cc.o
    [ 73%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/parse_regressor.cc.o
    [ 75%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/parser.cc.o
    [ 75%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/print.cc.o
    [ 76%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/rand48.cc.o
    [ 77%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/recall_tree.cc.o
    [ 78%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/scorer.cc.o
    [ 80%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/search_dep_parser.cc.o
    [ 80%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/search_entityrelationtask.cc.o
    [ 81%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/search_graph.cc.o
    [ 82%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/search_hooktask.cc.o
    [ 83%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/search_meta.cc.o
    [ 83%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/search_multiclasstask.cc.o
    [ 85%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/search_sequencetask.cc.o
    [ 86%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/search.cc.o
    [ 87%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/sender.cc.o
    [ 88%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/shared_feature_merger.cc.o
    [ 88%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/simple_label.cc.o
    [ 90%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/stagewise_poly.cc.o
    [ 91%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/svrg.cc.o
    [ 92%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/topk.cc.o
    [ 92%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/unique_sort.cc.o
    [ 93%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/version.cc.o
    [ 95%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/vw_exception.cc.o
    [ 96%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/vw_validate.cc.o
    [ 97%] Building CXX object vowpalwabbit/CMakeFiles/vw.dir/warm_cb.cc.o
    [ 97%] Linking CXX static library libvw.a
    [ 97%] Built target vw
    python/CMakeFiles/pylibvw.dir/build.make:95: *** target pattern contains no '%'.  Stop.
    CMakeFiles/Makefile2:708: recipe for target 'python/CMakeFiles/pylibvw.dir/all' failed
    make[2]: *** [python/CMakeFiles/pylibvw.dir/all] Error 2
    CMakeFiles/Makefile2:720: recipe for target 'python/CMakeFiles/pylibvw.dir/rule' failed
    make[1]: *** [python/CMakeFiles/pylibvw.dir/rule] Error 2
    Makefile:344: recipe for target 'pylibvw' failed
    make: *** [pylibvw] Error 2
    error: command 'cmake' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/sanit/Documents/Work/ConBan/vow/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bcdwz4bz/vowpalwabbit/setup.py'"'"'; __file__='"'"'/tmp/pip-install-bcdwz4bz/vowpalwabbit/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-5hyyiq95/install-record.txt --single-version-externally-managed --compile --install-headers /home/sanit/Documents/Work/ConBan/vow/include/site/python3.7/vowpalwabbit Check the logs for full command output.

Я пробовал погуглить это, но нашел только кое-что относительно cmake и ничего о pip. Что я могу сделать, чтобы это исправить? Спасибо!

ETA: вместо этого я попытался установить библиотеку на python3 .6. Выдает точно такую ​​же ошибку.

ETA2:

Я снова запустил установку, чтобы получить временный файл. Ошибка произошла в строке 84 файла build.make. Строка 84 - это ../lib.linux-x86_64-3.7/pylibvw.so: Boost::python3-NOTFOUND

Но ранее в журнале конфигурации есть еще одна строка, в которой говорится, что усиление было найдено.

ETA3:

Эта проблема еще не решена, но я смог установить библиотеку для Python2 без каких-либо проблем, поэтому сейчас я ее использую.

1 Ответ

0 голосов
/ 11 февраля 2020

Существует известная проблема для Ubuntu 16.04 и Python 3. Со страницы VowpalWabbit Python page :

Для python3 в Ubuntu 16.04 LTS: Ubuntu 16.04 по умолчанию использует старую, специально созданную версию boost. Таким образом, имена библиотек boost_ python не соответствуют стандартному соглашению об именах, принятому официальными выпусками boost для библиотек boost_ python. В этом случае вам может потребоваться вручную создать соответствующие символические ссылки. Ниже приведены примеры команд для python 3.5:

$ cd /usr/lib/x86_64-linux-gnu/
$ sudo ln -s libboost_python-py35.so libboost_python3.s
$ sudo ln -s libboost_python-py35.a libboost_python3.a
...