-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
By using both .sh and by hand method, I failed in setup.py anyway. Could you be so kind to check which is the key point?
Compiling toolkit/utils/region.pyx because it changed.
[1/1] Cythonizing toolkit/utils/region.pyx
/home/spai/anaconda3/envs/pysot_self/lib/python3.7/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: /home/spai/code/attack/pysot/toolkit/utils/region.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
Error compiling Cython file:
------------------------------------------------------------
...
from libc.stdlib cimport malloc, free
from libc.stdio cimport sprintf
from libc.string cimport strlen
cimport c_region
^
------------------------------------------------------------
toolkit/utils/region.pyx:11:8: 'c_region.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
RECTANGEL
POLYGON
MASK
cdef class RegionBounds:
cdef c_region.region_bounds* _c_region_bounds
^
------------------------------------------------------------
toolkit/utils/region.pyx:21:9: 'region_bounds' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
self._c_region_bounds.bottom = bottom
self._c_region_bounds.left = left
self._c_region_bounds.right = right
cdef class Rectangle:
cdef c_region.region_rectangle* _c_region_rectangle
^
------------------------------------------------------------
toolkit/utils/region.pyx:58:9: 'region_rectangle' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
self._c_region_rectangle.y,
self._c_region_rectangle.width,
self._c_region_rectangle.height)
cdef class Polygon:
cdef c_region.region_polygon* _c_region_polygon
^
------------------------------------------------------------
toolkit/utils/region.pyx:99:9: 'region_polygon' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
else:
pno_bounds = RegionBounds(-float("inf"), float("inf"),
-float("inf"), float("inf"))
cdef float only1 = 0
cdef float only2 = 0
cdef c_region.region_polygon* c_polygon1 = polygon1_._c_region_polygon
^
------------------------------------------------------------
toolkit/utils/region.pyx:182:9: 'region_polygon' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
pno_bounds = RegionBounds(-float("inf"), float("inf"),
-float("inf"), float("inf"))
cdef float only1 = 0
cdef float only2 = 0
cdef c_region.region_polygon* c_polygon1 = polygon1_._c_region_polygon
cdef c_region.region_polygon* c_polygon2 = polygon2_._c_region_polygon
^
------------------------------------------------------------
toolkit/utils/region.pyx:183:9: 'region_polygon' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
-float("inf"), float("inf"))
cdef float only1 = 0
cdef float only2 = 0
cdef c_region.region_polygon* c_polygon1 = polygon1_._c_region_polygon
cdef c_region.region_polygon* c_polygon2 = polygon2_._c_region_polygon
cdef c_region.region_bounds no_bounds = pno_bounds._c_region_bounds[0] # deference
^
------------------------------------------------------------
toolkit/utils/region.pyx:184:9: 'region_bounds' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
cdef class RegionBounds:
cdef c_region.region_bounds* _c_region_bounds
def __cinit__(self):
self._c_region_bounds = <c_region.region_bounds*>malloc(
^
------------------------------------------------------------
toolkit/utils/region.pyx:24:33: 'region_bounds' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
cdef class RegionBounds:
cdef c_region.region_bounds* _c_region_bounds
def __cinit__(self):
self._c_region_bounds = <c_region.region_bounds*>malloc(
sizeof(c_region.region_bounds))
^
------------------------------------------------------------
toolkit/utils/region.pyx:25:32: cimported module has no attribute 'region_bounds'
Error compiling Cython file:
------------------------------------------------------------
...
cdef class Rectangle:
cdef c_region.region_rectangle* _c_region_rectangle
def __cinit__(self):
self._c_region_rectangle = <c_region.region_rectangle*>malloc(
^
------------------------------------------------------------
toolkit/utils/region.pyx:61:36: 'region_rectangle' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
cdef class Rectangle:
cdef c_region.region_rectangle* _c_region_rectangle
def __cinit__(self):
self._c_region_rectangle = <c_region.region_rectangle*>malloc(
sizeof(c_region.region_rectangle))
^
------------------------------------------------------------
toolkit/utils/region.pyx:62:32: cimported module has no attribute 'region_rectangle'
Error compiling Cython file:
------------------------------------------------------------
...
args:
points: tuple of point
points = ((1, 1), (10, 10))
"""
num = len(points) // 2
self._c_region_polygon = <c_region.region_polygon*>malloc(
^
------------------------------------------------------------
toolkit/utils/region.pyx:108:34: 'region_polygon' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
points: tuple of point
points = ((1, 1), (10, 10))
"""
num = len(points) // 2
self._c_region_polygon = <c_region.region_polygon*>malloc(
sizeof(c_region.region_polygon))
^
------------------------------------------------------------
toolkit/utils/region.pyx:109:32: cimported module has no attribute 'region_polygon'
Error compiling Cython file:
------------------------------------------------------------
...
sizeof(c_region.region_polygon))
if not self._c_region_polygon:
self._c_region_polygon = NULL
raise MemoryError()
self._c_region_polygon.count = num
self._c_region_polygon.x = <float*>malloc(sizeof(float) * num)
^
------------------------------------------------------------
toolkit/utils/region.pyx:114:35: Cannot convert 'float *' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
raise MemoryError()
self._c_region_polygon.count = num
self._c_region_polygon.x = <float*>malloc(sizeof(float) * num)
if not self._c_region_polygon.x:
raise MemoryError()
self._c_region_polygon.y = <float*>malloc(sizeof(float) * num)
^
------------------------------------------------------------
toolkit/utils/region.pyx:117:35: Cannot convert 'float *' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
self._c_region_polygon.x[i] = points[i*2]
self._c_region_polygon.y[i] = points[i*2+1]
def __dealloc__(self):
if self._c_region_polygon is not NULL:
if self._c_region_polygon.x is not NULL:
^
------------------------------------------------------------
toolkit/utils/region.pyx:127:40: Invalid types for 'is_not' (Python object, void *)
Error compiling Cython file:
------------------------------------------------------------
...
self._c_region_polygon.y[i] = points[i*2+1]
def __dealloc__(self):
if self._c_region_polygon is not NULL:
if self._c_region_polygon.x is not NULL:
free(self._c_region_polygon.x)
^
------------------------------------------------------------
toolkit/utils/region.pyx:128:43: Cannot convert Python object to 'void *'
Error compiling Cython file:
------------------------------------------------------------
...
def __dealloc__(self):
if self._c_region_polygon is not NULL:
if self._c_region_polygon.x is not NULL:
free(self._c_region_polygon.x)
self._c_region_polygon.x = NULL
^
------------------------------------------------------------
toolkit/utils/region.pyx:129:43: Cannot convert 'void *' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
def __dealloc__(self):
if self._c_region_polygon is not NULL:
if self._c_region_polygon.x is not NULL:
free(self._c_region_polygon.x)
self._c_region_polygon.x = NULL
if self._c_region_polygon.y is not NULL:
^
------------------------------------------------------------
toolkit/utils/region.pyx:130:40: Invalid types for 'is_not' (Python object, void *)
Error compiling Cython file:
------------------------------------------------------------
...
if self._c_region_polygon is not NULL:
if self._c_region_polygon.x is not NULL:
free(self._c_region_polygon.x)
self._c_region_polygon.x = NULL
if self._c_region_polygon.y is not NULL:
free(self._c_region_polygon.y)
^
------------------------------------------------------------
toolkit/utils/region.pyx:131:43: Cannot convert Python object to 'void *'
Error compiling Cython file:
------------------------------------------------------------
...
if self._c_region_polygon.x is not NULL:
free(self._c_region_polygon.x)
self._c_region_polygon.x = NULL
if self._c_region_polygon.y is not NULL:
free(self._c_region_polygon.y)
self._c_region_polygon.y = NULL
^
------------------------------------------------------------
toolkit/utils/region.pyx:132:43: Cannot convert 'void *' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
cdef float only1 = 0
cdef float only2 = 0
cdef c_region.region_polygon* c_polygon1 = polygon1_._c_region_polygon
cdef c_region.region_polygon* c_polygon2 = polygon2_._c_region_polygon
cdef c_region.region_bounds no_bounds = pno_bounds._c_region_bounds[0] # deference
return c_region.compute_polygon_overlap(c_polygon1,
^
------------------------------------------------------------
toolkit/utils/region.pyx:185:19: cimported module has no attribute 'compute_polygon_overlap'
Traceback (most recent call last):
File "setup.py", line 21, in <module>
ext_modules=cythonize(ext_modules)
File "/home/spai/anaconda3/envs/pysot_self/lib/python3.7/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
cythonize_one(*args)
File "/home/spai/anaconda3/envs/pysot_self/lib/python3.7/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: toolkit/utils/region.pyx
# packages in environment at /home/spai/anaconda3/envs/pysot_self:
#
# Name Version Build Channel
_libgcc_mutex 0.1 main https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
_openmp_mutex 5.1 1_gnu https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
blas 1.0 mkl https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
brotlipy 0.7.0 py37h27cfd23_1003 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
ca-certificates 2023.12.12 h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
certifi 2022.12.7 py37h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
cffi 1.15.1 py37h5eee18b_3 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
charset-normalizer 2.0.4 pyhd3eb1b0_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
colorama 0.4.6 pypi_0 pypi
cryptography 39.0.1 py37h9ce1e76_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
cuda90 1.0 h6433d27_0 pytorch
cudatoolkit 9.0 h13b8566_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
cudnn 7.6.5 cuda9.0_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
cycler 0.11.0 pypi_0 pypi
cython 3.0.8 pypi_0 pypi
flit-core 3.6.0 pyhd3eb1b0_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
fonttools 4.38.0 pypi_0 pypi
freetype 2.12.1 h4a9f257_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
giflib 5.2.1 h5eee18b_3 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
idna 3.4 py37h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
intel-openmp 2023.1.0 hdb19cb5_46306 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
jpeg 9e h5eee18b_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
kiwisolver 1.4.5 pypi_0 pypi
lcms2 2.12 h3be6417_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
ld_impl_linux-64 2.38 h1181459_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
lerc 3.0 h295c915_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libblas 3.9.0 1_h86c2bf4_netlib https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
libcblas 3.9.0 5_h92ddd45_netlib https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
libdeflate 1.17 h5eee18b_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libffi 3.4.4 h6a678d5_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libgcc-ng 11.2.0 h1234567_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libgfortran-ng 11.2.0 h00389a5_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libgfortran5 11.2.0 h1234567_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libgomp 11.2.0 h1234567_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
liblapack 3.9.0 5_h92ddd45_netlib https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
libopenblas 0.3.21 h043d6bf_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libpng 1.6.39 h5eee18b_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libstdcxx-ng 11.2.0 h1234567_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libtiff 4.5.1 h6a678d5_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libwebp 1.2.4 h11a3e52_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libwebp-base 1.2.4 h5eee18b_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
lz4-c 1.9.4 h6a678d5_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
matplotlib 3.5.3 pypi_0 pypi
mkl 2018.0.3 1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
nccl 1.3.5 cuda9.0_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
ncurses 6.4 h6a678d5_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
ninja 1.10.2 h06a4308_5 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
ninja-base 1.10.2 hd09550d_5 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
numpy 1.21.6 py37h976b520_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
opencv-python 4.9.0.80 pypi_0 pypi
openssl 1.1.1w h7f8727e_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
packaging 23.2 pypi_0 pypi
pillow 9.4.0 py37h6a678d5_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
pip 23.3.2 pyhd8ed1ab_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
protobuf 4.24.4 pypi_0 pypi
pycparser 2.21 pyhd3eb1b0_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
pyopenssl 23.0.0 py37h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
pyparsing 3.1.1 pypi_0 pypi
pysocks 1.7.1 py37_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
python 3.7.16 h7a1cb2a_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
python-dateutil 2.8.2 pypi_0 pypi
python_abi 3.7 2_cp37m https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
pytorch 0.4.1 py37ha74772b_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
pyyaml 6.0.1 pypi_0 pypi
readline 8.2 h5eee18b_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
requests 2.28.1 py37h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
setuptools 69.0.3 pyhd8ed1ab_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
six 1.16.0 pypi_0 pypi
sqlite 3.41.2 h5eee18b_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
tensorboardx 2.6.2.2 pypi_0 pypi
tk 8.6.12 h1ccaba5_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
torchvision 0.13.1 cpu_py37h164cc8f_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
tqdm 4.66.1 pypi_0 pypi
typing_extensions 4.4.0 py37h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
urllib3 1.26.14 py37h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
wheel 0.38.4 py37h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
xz 5.4.5 h5eee18b_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
yacs 0.1.8 pypi_0 pypi
zlib 1.2.13 h5eee18b_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
zstd 1.5.5 hc292b87_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels