Quantcast
Viewing all articles
Browse latest Browse all 14271

Python Setuptools Unable to Find .o Extension on Linux

I was trying to compile CppExtension example from https://pytorch.org/tutorials/advanced/cpp_extension.html#building-with-setuptools on Python, but the error said that it can not find the "filename.o" file. I believe, based on the above website only two files required, i.e, setup.py and lltm.cpp are required.

Please help, thank you.

Command to compile :

python3 setup.py install --user

My system :Ubuntu 22.04.3 LTS

pip listsetuptools         69.0.2torch              2.2.0+cpu

The log :

Emitting ninja build file /home/ka/PROJECTS/From_Web/CornerNet-master/models/py_utils/_cpools/build/temp.linux-x86_64-cpython-310/build.ninja...Compiling objects...Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)1.11.1.git.kitware.jobserver-1x86_64-linux-gnu-g++ -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -g -fwrapv -O2 /home/ka/PROJECTS/From_Web/CornerNet-master/models/py_utils/_cpools/build/temp.linux-x86_64-cpython-310/src/top_pool.o -L/home/ka/PROJECTS/centerPool/lib/python3.10/site-packages/torch/lib -L/usr/lib/x86_64-linux-gnu -lc10 -ltorch -ltorch_cpu -ltorch_python -o build/lib.linux-x86_64-cpython-310/top_pool.cpython-310-x86_64-linux-gnu.so/usr/bin/ld: cannot find /home/ka/PROJECTS/From_Web/CornerNet-master/models/py_utils/_cpools/build/temp.linux-x86_64-cpython-310/src/top_pool.o: No such file or directorycollect2: error: ld returned 1 exit statuserror: command '/usr/bin/x86_64-linux-gnu-g++' failed with exit code 1

Viewing all articles
Browse latest Browse all 14271

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>