Canjie-Luo / Text-Image-Augmentation

Geometric Augmentation for Text Image
MIT License
480 stars 89 forks source link

CMake fail #2

Closed huizhang0110 closed 5 years ago

huizhang0110 commented 5 years ago

Thanks for your code, but when I compiled the code according to the readme.md, I meet the following error.

Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)

default

Canjie-Luo commented 5 years ago

Please reinstall your Python2.7 or try: cmake -D PYTHON_INCLUDE_DIR=/usr/include/python2.7 -D PYTHON_LIBRARY=/usr/lib/python2.7/config/libpython2.7.so -D CUDA_USE_STATIC_CUDA_RUNTIME=OFF .. @huizhang0110

huizhang0110 commented 5 years ago

Thanks, I successfully compiled Augment.so through

/home/zhui/.local/cmake3.13/bin/cmake .. -D CUDA_USE_STATIC_CUDA_RUNTIME=OFF \                                                                                                                    1 ↵
-DPYTHON_INCLUDE_DIR=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")  \
-DPYTHON_LIBRARY=$(python -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))")

But how do I call it via python (import Augment) like in demo.py ? @Canjie-Luo

Canjie-Luo commented 5 years ago

Copy the Augment.so to the target folder or your system library folder (/usr/lib/ and so on) and import Augment.

huizhang0110 commented 5 years ago

There is still a problem in my anaconda3 environment. Do you have a plan to support python3 env?

Canjie-Luo commented 5 years ago

Of course. That's our future work. But it may take some time. Welcome to develop the project together. You can create a new branch and the current stable version remains as the master.