clab / dynet

DyNet: The Dynamic Neural Network Toolkit
Apache License 2.0
3.41k stars 707 forks source link

Cannot install Dynet Python bindings on Python 3.10 and 3.11 #1670

Open Futyn-Maker opened 2 months ago

Futyn-Maker commented 2 months ago

Hello!

Unable to install Python bindings for Dynet. Tried two different versions of Python: 3.10 and 3.11, both from pip and from the GitHub repository.

pip3 install dynet
:scalar_constant_op<float>, const Eigen::TensorMap<Eigen::Tensor<float, 1> > > > > > > > > > >]’:                       
      /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/eigen/unsupported/Eigen/CXX11/src/Tensor/TensorDevice.h:35:62:   required from ‘Eigen::TensorDevice<ExpressionType, DeviceType>& Eigen::TensorDevice<ExpressionType, DeviceType>::operator=(const OtherDerived&) [with OtherDerived = Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_opposite_op<float>, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_log_op<float>, const Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_max_op<float, float>, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_opposite_op<float>, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_log_op<float>, const Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_max_op<float, float>, const Eigen::TensorMap<Eigen::Tensor<float, 1> >, const Eigen::TensorCwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, const Eigen::TensorMap<Eigen::Tensor<float, 1> > > > > >, const Eigen::TensorCwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_opposite_op<float>, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_log_op<float>, const Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_max_op<float, float>, const Eigen::TensorMap<Eigen::Tensor<float, 1> >, const Eigen::TensorCwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, const Eigen::TensorMap<Eigen::Tensor<float, 1> > > > > > > > > >; ExpressionType = Eigen::TensorMap<Eigen::Tensor<float, 1> >; DeviceType = Eigen::DefaultDevice]’              
      /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/dynet/nodes-random.cc:172:33:   required from ‘void dynet::RandomGumbel::forward_dev_impl(const MyDevice&, const std::vector<const dynet::Tensor*>&, dynet::Tensor&) const [with MyDevice = dynet::Device_CPU]’                                                                                  
      /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/dynet/nodes-random.cc:184:1:   required from here
      /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/eigen/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h:61:118: warning: ignoring attributes on template argument ‘Eigen::TensorEvaluator<const Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<float, 1> >, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_opposite_op<float>, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_log_op<float>, const Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_max_op<float, float>, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_opposite_op<float>, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_log_op<float>, const Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_max_op<float, float>, const Eigen::TensorMap<Eigen::Tensor<float, 1> >, const Eigen::TensorCwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, const Eigen::TensorMap<Eigen::Tensor<float, 1> > > > > >, const Eigen::TensorCwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_opposite_op<float>, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_log_op<float>, const Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_max_op<float, float>, const Eigen::TensorMap<Eigen::Tensor<float, 1> >, const Eigen::TensorCwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, const Eigen::TensorMap<Eigen::Tensor<float, 1> > > > > > > > > > >, Eigen::DefaultDevice>::PacketReturnType’ {aka ‘__m256’} [-Wignored-attributes]                                          
      In file included from /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/eigen/unsupported/Eigen/CXX11/Tensor:112,                                                                                       
                       from /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/dynet/tensor-eigen.h:13,   
                       from /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/dynet/nodes-rounding.cc:1: 
      /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/eigen/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h: In instantiation of ‘struct Eigen::TensorEvaluator<const Eigen::TensorMap<Eigen::Tensor<float, 1> >, Eigen::DefaultDevice>’:                                                                                      
      /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/eigen/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h:310:51:   required from ‘struct Eigen::TensorEvaluator<const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_round_op<float>, const Eigen::TensorMap<Eigen::Tensor<float, 1> > >, Eigen::DefaultDevice>’         
      /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/eigen/unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h:97:70:   required from ‘struct Eigen::TensorEvaluator<const Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<float, 1> >, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_round_op<float>, const Eigen::TensorMap<Eigen::Tensor<float, 1> > > >, Eigen::DefaultDevice>’                                                           
      /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/eigen/unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h:121:66:   required from ‘const bool Eigen::internal::IsVectorizable<Eigen::DefaultDevice, const Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<float, 1> >, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_round_op<float>, const Eigen::TensorMap<Eigen::Tensor<float, 1> > > > >::value’                        
      /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/eigen/unsupported/Eigen/CXX11/src/Tensor/TensorDevice.h:35:62:   required from ‘Eigen::TensorDevice<ExpressionType, DeviceType>& Eigen::TensorDevice<ExpressionType, DeviceType>::operator=(const OtherDerived&) [with OtherDerived = Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_round_op<float>, const Eigen::TensorMap<Eigen::Tensor<float, 1> > >; ExpressionType = Eigen::TensorMap<Eigen::Tensor<float, 1> >; DeviceType = Eigen::DefaultDevice]’                                                                 
      /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/dynet/nodes-rounding.cc:29:33:   required from ‘void dynet::Round::forward_dev_impl(const MyDevice&, const std::vector<const dynet::Tensor*>&, dynet::Tensor&) const [with MyDevice = dynet::Device_CPU]’                                                                                        
      /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/dynet/nodes-rounding.cc:42:1:   required from here                                                                                                                       
      /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/eigen/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h:169:66: warning: ignoring attributes on template argument ‘Eigen::PacketType<float, Eigen::DefaultDevice>::type’ {aka ‘__m256’} [-Wignored-attributes]                                                             
        169 |     PacketAccess = (internal::unpacket_traits<PacketReturnType>::size > 1),                               
            |                                                                  ^~~~                                     
      /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/eigen/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h: In instantiation of ‘struct Eigen::TensorEvaluator<Eigen::TensorMap<Eigen::Tensor<float, 1> >, Eigen::DefaultDevice>’:                                                                                            
      /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/eigen/unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h:101:55:   required from ‘struct Eigen::TensorEvaluator<const Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<float, 1> >, const Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_round_op<float>, const Eigen::TensorMap<Eigen::Tensor<float, 1> > > >, Eigen::DefaultDevice>’                                                          

...

INFO:root:running build_ext                                                                                       
      INFO:root:Building Cython extensions...                                                                           
      INFO:root:INCLUDE_DIRS='/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500 /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/eigen'                                                       
      INFO:root:LIBRARIES='dynet'                                                                                       
      INFO:root:LIBRARY_DIRS='/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/dynet/ .'                                                                                                                     
      INFO:root:COMPILER_ARGS='-std=c++11 -Wno-unused-function'                                                         
      INFO:root:EXTRA_LINK_ARGS="-Wl,-rpath='/home/futyn/.venvs/ling/lib/',--no-as-needed"                              
      INFO:root:RUNTIME_LIB_DIRS='/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/dynet/ /home/futyn/.venvs/ling/lib/'                                                                                      
      /tmp/pip-build-env-18t_slsk/overlay/lib/python3.11/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/python/_dynet.pxd                           
        tree = Parsing.p_module(s, pxd, full_module_name)                                                               
      Compiling /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/python/_dynet.pyx because it changed.                                                                                                       
      [1/1] Cythonizing /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/python/_dynet.pyx                                                                                                                   
      INFO:root:building '_dynet' extension                                                                             
      INFO:root:creating build                                                                                          
      INFO:root:creating build/temp.linux-x86_64-cpython-311                                                            
      INFO:root:creating build/temp.linux-x86_64-cpython-311/tmp                                                        
      INFO:root:creating build/temp.linux-x86_64-cpython-311/tmp/pip-install-18x40_u7                                   
      INFO:root:creating build/temp.linux-x86_64-cpython-311/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500                                                                                                                    
      INFO:root:creating build/temp.linux-x86_64-cpython-311/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build                                                                                                              
      INFO:root:creating build/temp.linux-x86_64-cpython-311/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit                                                                                                 
      INFO:root:creating build/temp.linux-x86_64-cpython-311/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/python                                                                                          
      INFO:root:/usr/bin/gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500 -I/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/eigen -I/home/futyn/.venvs/ling/include -I/usr/include/python3.11 -c /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/python/_dynet.cpp -o build/temp.linux-x86_64-cpython-311/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/python/_dynet.o -std=c++11 -Wno-unused-function                                                                       
      INFO:root:/usr/bin/g++ -shared -Wl,-O1 -Wl,-Bsymbolic-functions -g -fwrapv -O2 build/temp.linux-x86_64-cpython-311/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/python/_dynet.o -L/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/dynet/ -L. -L/usr/lib/x86_64-linux-gnu -Wl,--enable-new-dtags,-R/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/dynet/ -Wl,--enable-new-dtags,-R/home/futyn/.venvs/ling/lib/ -ldynet -o /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/python/_dynet.cpython-311-x86_64-linux-gnu.so -Wl,-rpath='/home/futyn/.venvs/ling/lib/',--no-as-needed        
      INFO:root:Copying built extensions...                                                                             
      [100%] Built target pydynet                                                                                       
      INFO:root:Installing...                                                                                           
      [ 98%] Built target dynet                                                                                         
      [ 98%] Built target pydynet_precopy                                                                               
      [100%] Built target pydynet                                                                                       
      Install the project...                                                                                            
      -- Install configuration: "Release"                                                                               
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/aligned-mem-pool.h                                           
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/c2w.h                                                        
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/cfsm-builder.h                                               
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/cuda.h                                                       
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/cudnn-ops.h                                                  
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/deep-lstm.h                                                  
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/devices.h                                                    
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/device-structs.h                                             
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/dict.h                                                       
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/dim.h                                                        
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/dynet.h                                                      
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/dynet-helper.h                                               
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/except.h                                                     
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/exec.h                                                       
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/expr.h                                                       
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/fast-lstm.h                                                  
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/functors.h                                                   
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/globals.h                                                    
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/gpu-kernels.h                                                
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/gpu-ops.h                                                    
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/grad-check.h                                                 
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/graph.h                                                      
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/gru.h                                                        
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/hsm-builder.h                                                
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/index-tensor.h                                               
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/init.h                                                       
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/io.h                                                         
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/lstm.h                                                       
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/matrix-multiply.h                                            
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/mem.h                                                        
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/model.h                                                      
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/mp.h                                                         
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-activations.h                                          
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-affinetransform.h                                      
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-argmax.h                                               
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-arith-const.h                                          
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-arith-cwise.h                                          
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-arith-sum.h                                            
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-arith-unary.h                                          
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-concat.h                                               
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-const.h                                                
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-contract.h                                             
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-conv2d.h                                               
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-conv.h                                                 
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-cumulative.h                                           
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-def-macros.h                                           
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-dropout.h                                              
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-flow.h                                                 
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes.h                                                      
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-hinge.h                                                
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-impl-macros.h                                          
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-linalg.h                                               
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-logsumexp.h                                            
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-losses.h                                               
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-lstm.h                                                 
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-matrixmultiply.h                                       
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-maxpooling2d.h                                         
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-minmax.h                                               
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-moments.h                                              
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-normalization.h                                        
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-norms.h                                                
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-pickneglogsoftmax.h                                    
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-random.h                                               
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-rounding.h                                             
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-select.h                                               
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-similarities.h                                         
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-softmaxes.h                                            
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-to-device.h                                            
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/nodes-trig.h                                                 
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/param-init.h                                                 
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/param-nodes.h                                                
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/pretrain.h                                                   
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/rnn.h                                                        
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/rnn-state-machine.h                                          
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/saxe-init.h                                                  
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/shadow-params.h                                              
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/sig.h                                                        
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/simd-functors.h                                              
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/str-util.h                                                   
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/tensor-eigen.h                                               
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/tensor.h                                                     
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/timing.h                                                     
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/training.h                                                   
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/treelstm.h                                                   
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/virtual-cudnn.h                                              
      -- Up-to-date: /home/futyn/.venvs/ling/include/dynet/weight-decay.h                                               
      -- Installing: /home/futyn/.venvs/ling/lib/libdynet.so                                                            
      INFO:root:running build_py                                                                                        
      INFO:root:Building Python files...                                                                                
      INFO:root:creating build/lib.linux-x86_64-cpython-311                                                             
      INFO:root:copying dynet.py -> build/lib.linux-x86_64-cpython-311                                                  
      INFO:root:copying dynet_viz.py -> build/lib.linux-x86_64-cpython-311                                              
      INFO:root:copying dynet_config.py -> build/lib.linux-x86_64-cpython-311                                           
      INFO:root:running build_ext                                                                                       
      INFO:root:Building Cython extensions...                                                                           
      INFO:root:INCLUDE_DIRS='/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500 /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/eigen'                                                       
      INFO:root:LIBRARIES='dynet'                                                                                       
      INFO:root:LIBRARY_DIRS='/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/dynet/ . /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/dynet/'                                             
      INFO:root:COMPILER_ARGS='-std=c++11 -Wno-unused-function'                                                         
      INFO:root:EXTRA_LINK_ARGS="-Wl,-rpath='/home/futyn/.venvs/ling/lib/python3.11/site-packages/../../../lib/',--no-as-needed"                                                                                                                
      INFO:root:RUNTIME_LIB_DIRS='/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/dynet/ /home/futyn/.venvs/ling/lib/python3.11/site-packages/../../../lib/'                                                                   
      /tmp/pip-build-env-18t_slsk/overlay/lib/python3.11/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/python/_dynet.pxd                                              
        tree = Parsing.p_module(s, pxd, full_module_name)                                                               
      Compiling /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/python/_dynet.pyx because it changed.  
      [1/1] Cythonizing /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/python/_dynet.pyx              
      INFO:root:building '_dynet' extension                                                                             
      INFO:root:creating build/temp.linux-x86_64-cpython-311/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/python                                                                                                             
      INFO:root:/usr/bin/gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500 -I/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/eigen -I/home/futyn/.venvs/ling/include -I/usr/include/python3.11 -c /tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/python/_dynet.cpp -o build/temp.linux-x86_64-cpython-311/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/python/_dynet.o -std=c++11 -Wno-unused-function                                                                                                             
      INFO:root:/usr/bin/g++ -shared -Wl,-O1 -Wl,-Bsymbolic-functions -g -fwrapv -O2 build/temp.linux-x86_64-cpython-311/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/python/_dynet.o -L/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/dynet/ -L. -L/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/build/py3.11-64bit/dynet/ -L/usr/lib/x86_64-linux-gnu -Wl,--enable-new-dtags,-R/tmp/pip-install-18x40_u7/dynet_2379b85091854d799bbb37257f86e500/dynet/ -Wl,--enable-new-dtags,-R/home/futyn/.venvs/ling/lib/python3.11/site-packages/../../../lib/ -ldynet -o build/lib.linux-x86_64-cpython-311/_dynet.cpython-311-x86_64-linux-gnu.so -Wl,-rpath='/home/futyn/.venvs/ling/lib/python3.11/site-packages/../../../lib/',--no-as-needed                                                                        
      INFO:root:Copying built extensions...                                                                             
      INFO:wheel:installing to build/bdist.linux-x86_64/wheel                                                           
      INFO:root:running install                                                                                         
      INFO:root:running install_lib                                                                                     
      INFO:root:creating build/bdist.linux-x86_64                                                                       
      INFO:root:creating build/bdist.linux-x86_64/wheel                                                                 
      INFO:root:copying build/lib.linux-x86_64-cpython-311/dynet_config.py -> build/bdist.linux-x86_64/wheel            
      INFO:root:copying build/lib.linux-x86_64-cpython-311/dynet_viz.py -> build/bdist.linux-x86_64/wheel               
      INFO:root:copying build/lib.linux-x86_64-cpython-311/_dynet.cpython-311-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/wheel                                                                                                             
      INFO:root:copying build/lib.linux-x86_64-cpython-311/dynet.py -> build/bdist.linux-x86_64/wheel                   
      INFO:root:running install_data                                                                                    
      INFO:root:creating build/bdist.linux-x86_64/wheel/dyNET-2.1.2.data                                                
      INFO:root:creating build/bdist.linux-x86_64/wheel/dyNET-2.1.2.data/data                                           
      INFO:root:running install_egg_info                                                                                
      INFO:root:running egg_info                                                                                        
      INFO:root:creating dyNET.egg-info                                                                                 
      INFO:root:writing dyNET.egg-info/PKG-INFO                                                                         
      INFO:root:writing dependency_links to dyNET.egg-info/dependency_links.txt                                         
      INFO:root:writing requirements to dyNET.egg-info/requires.txt                                                     
      INFO:root:writing top-level names to dyNET.egg-info/top_level.txt                                                 
      INFO:root:writing manifest file 'dyNET.egg-info/SOURCES.txt'                                                      
      /tmp/pip-build-env-18t_slsk/overlay/lib/python3.11/site-packages/setuptools/command/sdist.py:115: SetuptoolsDeprecationWarning: `build_py` command does not inherit from setuptools' `build_py`.                                          
      !!                                                                                                                

              ********************************************************************************                          
              Custom 'build_py' does not implement 'get_data_files_without_manifest'.                                   
              Please extend command classes from setuptools instead of distutils.                                       

              See https://peps.python.org/pep-0632/ for details.                                                        
              ********************************************************************************                          

      !!                                                                                                                
        self._add_data_files(self._safe_data_files(build_py))                                                           
      INFO:root:reading manifest file 'dyNET.egg-info/SOURCES.txt'                                                      
      INFO:root:adding license file 'LICENSE.txt'                                                                       
      INFO:root:writing manifest file 'dyNET.egg-info/SOURCES.txt'                                                      
      INFO:root:Copying dyNET.egg-info to build/bdist.linux-x86_64/wheel/dyNET-2.1.2-py3.11.egg-info                    
      INFO:root:running install_scripts                                                                                 
      error: [Errno 2] No such file or directory: 'LICENSE.txt'                                                         
      [end of output]                                                                                                   

  note: This error originates from a subprocess, and is likely not a problem with pip.                                  
  ERROR: Failed building wheel for dynet                                                                                
Failed to build dynet                                                                                                   
ERROR: Could not build wheels for dynet, which is required to install pyproject.toml-based projects

As far as I understand, the problem is the absence of a license file, but I don’t really understand where exactly it should be.

System: Debian 12.

Please tell me how to fix the error?

j0ma commented 2 months ago

Possible duplicate of #1662?