1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
running build_ext Compiling pycocotools/_mask.pyx because it changed. [1/1] Cythonizing pycocotools/_mask.pyx /home/mcj/disk/anaconda3/envs/PSN/lib/python3.6/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: /disk/mcj/mcj/psn/lib/pycocotools/_mask.pyx tree = Parsing.p_module(s, pxd, full_module_name) Error compiling Cython file: ------------------------------------------------------------ ... cdef np.ndarray[np.double_t, ndim=1] np_poly n = len(poly) Rs = RLEs(n) for i, p in enumerate(poly): np_poly = np.array(p, dtype=np.double, order='F') rleFrPoly( <RLE*>&Rs._R[i], <const double*> np_poly.data, len(np_poly)/2, h, w ) ^ ------------------------------------------------------------ pycocotools/_mask.pyx:258:78: Cannot assign type 'double' to 'siz' (alias of 'unsigned long') Traceback (most recent call last): File "setup.py", line 135, in <module> cmdclass={'build_ext': custom_build_ext}, File "/home/mcj/disk/anaconda3/envs/PSN/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/home/mcj/disk/anaconda3/envs/PSN/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/home/mcj/disk/anaconda3/envs/PSN/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/home/mcj/disk/anaconda3/envs/PSN/lib/python3.6/distutils/command/build_ext.py", line 339, in run self.build_extensions() File "setup.py", line 112, in build_extensions build_ext.build_extensions(self) File "/home/mcj/disk/anaconda3/envs/PSN/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions self._build_extensions_serial() File "/home/mcj/disk/anaconda3/envs/PSN/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial self.build_extension(ext) File "/home/mcj/disk/anaconda3/envs/PSN/lib/python3.6/site-packages/Cython/Distutils/build_ext.py", line 131, in build_extension ext,force=self.force, quiet=self.verbose == 0, **options File "/home/mcj/disk/anaconda3/envs/PSN/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize cythonize_one(*args) File "/home/mcj/disk/anaconda3/envs/PSN/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one raise CompileError(None, pyx_file) Cython.Compiler.Errors.CompileError: pycocotools/_mask.pyx Compiling nms kernels by nvcc... nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning). Including CUDA code. /disk/mcj/mcj/psn/lib/model/nms ['/disk/mcj/mcj/psn/lib/model/nms/src/nms_cuda_kernel.cu.o'] generating /tmp/tmpzohxlg4o/_nms.c setting the current directory to '/tmp/tmpzohxlg4o' running build_ext building '_nms' extension creating disk creating disk/mcj creating disk/mcj/mcj creating disk/mcj/mcj/psn creating disk/mcj/mcj/psn/lib creating disk/mcj/mcj/psn/lib/model creating disk/mcj/mcj/psn/lib/model/nms creating disk/mcj/mcj/psn/lib/model/nms/src gcc -pthread -B /home/mcj/disk/anaconda3/envs/PSN/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -fPIC -DWITH_CUDA -I/home/mcj/disk/anaconda3/envs/PSN/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/mcj/disk/anaconda3/envs/PSN/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/mcj/disk/anaconda3/envs/PSN/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/mcj/disk/anaconda3/envs/PSN/include/python3.6m -c _nms.c -o ./_nms.o -std=c99 |
解决方案:
conda install cython=0.29.21 numpy