Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error while installing #37

Open
mithunpaul08 opened this issue May 29, 2023 · 4 comments
Open

error while installing #37

mithunpaul08 opened this issue May 29, 2023 · 4 comments

Comments

@mithunpaul08
Copy link

Is there a particular version of Cython we should use? I get the following error (interestingly on both an osx and a linux machine)- wait , won't this work on a conda environment?

Collecting depccg
  Downloading depccg-2.0.3.2.tar.gz (3.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.5/3.5 MB 54.0 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [2 lines of output]
      Could not import Cython, which is required to build depccg extension modules.
      Please install cython and numpy prior to installing depccg.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
(qnlp) which cython
~/miniconda3/envs/qnlp/bin/cython
(qnlp) cython --version
Cython version 0.29.35
@mithunpaul08
Copy link
Author

update. when i try python setup.py build_ext this is the specific error in depccg which is failing to install

depccg/parsing.pyx:44:42: unknown type in template argument
building 'depccg.morpha' extension
creating build/temp.linux-x86_64-cpython-38
creating build/temp.linux-x86_64-cpython-38/depccg
gcc -pthread -B /nas/home/mithun/miniconda3/envs/qnlp/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ic -I/nas/home/mithun/miniconda3/envs/qnlp/include/python3.8 -c depccg/morpha.cpp -o build/temp.linux-x86_64-cpython-38/depccg/morpha.o -O3 -Wall -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
creating build/lib.linux-x86_64-cpython-38
creating build/lib.linux-x86_64-cpython-38/depccg
g++ -pthread -B /nas/home/mithun/miniconda3/envs/qnlp/compiler_compat -Wl,--sysroot=/ -pthread -shared -B /nas/home/mithun/miniconda3/envs/qnlp/compiler_compat -L/nas/home/mithun/miniconda3/envs/qnlp/lib -Wl,-rpath=/nas/home/mithun/miniconda3/envs/qnlp/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-cpython-38/depccg/morpha.o -o build/lib.linux-x86_64-cpython-38/depccg/morpha.cpython-38-x86_64-linux-gnu.so c/morpha.o
building 'depccg._parsing' extension
gcc -pthread -B /nas/home/mithun/miniconda3/envs/qnlp/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/nas/home/mithun/miniconda3/envs/qnlp/lib/python3.8/site-packages/numpy/core/include -I. -Idepccg -I/nas/home/mithun/miniconda3/envs/qnlp/include/python3.8 -c depccg/parsing.cpp -o build/temp.linux-x86_64-cpython-38/depccg/parsing.o -O3 -Wall -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
depccg/parsing.cpp:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
 #error Do not use this file, it is the result of a failed Cython compilation.

@filemon11
Copy link

I get this error too with Cython 0.29.16 which was confirmed to work here #27
I really can't wrap my head around this...

@masashi-y
Copy link
Owner

masashi-y commented Aug 26, 2023

Hi all. Sorry for being late to reply. Now I want to try as much to solve this issue.
I used Python 3.10.0 and Cython 3.0.1 and noticed it caused compile error in the Cython side, and made a patch. Could you try installing depccg from the source?

$ git clone https://github.com/masashi-y/depccg
$ cd depccg
$ pip install numpy cython
$ python setup.py build_ext

@nikhilkhatri
Copy link

Hi @masashi-y,
Installing the latest version from source worked for me!

Would it be possible to release a new version to PyPI with your patch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants