clab / clab/dynet

Install fails on stale dynet directory being included in anaconda

Open
#1,182 7 comments 0 reactions 0 assignees View on GitHub
moderate bug
Dominant language
C++
Stars
3.4k
Forks
701
PR merge metrics
No merged PRs in 30d

Description

Hi, running `pip install -U git+https://github.com/clab/dynet#egg=dynet` after installing all the requirements with brew.

Got the following errors:
`Complete output from command /Users/talbaumel/miniconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/fr/6yxg1k8j1xsfd5v3b4z20c480000gn/T/pip-build-aeor4jp_/dynet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/fr/6yxg1k8j1xsfd5v3b4z20c480000gn/T/pip-tajiffj5-record/install-record.txt --single-version-externally-managed --compile:
`

`sor.h:20:8: error: redefinition of 'IndexTensor'
struct IndexTensor {
^
/Users/talbaumel/miniconda3/include/dynet/tensor.h:395:8: note: previous definition is here
struct IndexTensor {
^
In file included from /private/var/folders/fr/6yxg1k8j1xsfd5v3b4z20c480000gn/T/pip-build-aeor4jp_/dynet/build/py3.6-64bit/python/_dynet.cpp:555:
In file included from /Users/talbaumel/miniconda3/include/dynet/expr.h:22:
In file included from /Users/talbaumel/miniconda3/include/dynet/nodes.h:1:
/private/var/folders/fr/6yxg1k8j1xsfd5v3b4z20c480000gn/T/pip-build-aeor4jp_/dynet/dynet/nodes-activations.h:59:96: error: no type named 'silu' in namespace 'dynet::nt'
virtual int autobatch_sig(const ComputationGraph &cg, SigMap &sm) const override { Sig s(nt::silu); return sm.get_idx(s); }
~~~~^
/private/var/folders/fr/6yxg1k8j1xsfd5v3b4z20c480000gn/T/pip-build-aeor4jp_/dynet/dynet/nodes-activations.h:59:91: warning: parentheses were disambiguated as a function declaration [-Wvexing-parse]
virtual int autobatch_sig(const ComputationGraph &cg, SigMap &sm) const override { Sig s(nt::silu); return sm.get_idx(s); }
^~~~~~~~~~
/private/var/folders/fr/6yxg1k8j1xsfd5v3b4z20c480000gn/T/pip-build-aeor4jp_/dynet/dynet/nodes-activations.h:59:92: note: add a pair of parentheses to declare a variable
virtual int autobatch_sig(const ComputationGraph &cg, SigMap &sm) const override { Sig s(nt::silu); return sm.get_idx(s); }
^
(
In file included from /private/var/folders/fr/6yxg1k8j1xsfd5v3b4z20c480000gn/T/pip-build-aeor4jp_/dynet/build/py3.6-64bit/python/_dynet.cpp:555:
In file included from /Users/talbaumel/miniconda3/include/dynet/expr.h:22:
/Users/talbaumel/miniconda3/include/dynet/nodes.h:5:10: fatal error: 'dynet/nodes-arith-scalar.h' file not found
#include "dynet/nodes-arith-scalar.h"`

`Command "/Users/talbaumel/miniconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/fr/6yxg1k8j1xsfd5v3b4z20c480000gn/T/pip-build-aeor4jp_/dynet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/fr/6yxg1k8j1xsfd5v3b4z20c480000gn/T/pip-tajiffj5-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/fr/6yxg1k8j1xsfd5v3b4z20c480000gn/T/pip-build-aeor4jp_/dynet/
`

Thanks!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with setup.py and the dynet headers named in the installation output, including tensor.h, nodes.h, and nodes-activations.h. Reproduce the pip installation failure in the reported Anaconda/Python environment; done means the package installs without the duplicate IndexTensor, missing silu, or missing nodes-arith-scalar.h errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
anaconda, cpp, python
Domain
build-system, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.