A few problems to notice when installing
Recently I decided to play with Word-As-Image, which depends on diffvg project. I pulled the repo and tried to follow the python setup.py install instruction, but encounters a few problems. I list them below, for developers to consult with.
- NoneType error as in https://github.com/BachiLi/diffvg/issues/57. This error comes from the undefined
LIBDIRconfig variable. I'm using a Miniconda3 / python 3.8 environment, and not sure if the absence of it is abnormal, but I found another variable calledLIBDEST, and replaced the former one. - cmake fail with
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '/m']' returned non-zero exit status 1.
I located the error in subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp) in setup.py, but first assumed that this is caused by not using CUDA. I rewrote some lines in setup.py, in vain. Then I assumed some cmake config error and looked at the cmake prompts, no use. The final solution lies in the error message
(path\to)\diffvg\diffvg.h(97,15): error C2169: 'log2': intrinsic function, cannot be defined [(path\to)\diffvg\build\temp.win-amd64-cpython-38\Release\diffvg.vcxproj]
and I commented out the inline double log2(double x) { .. } function in diffvg.h. It works.
3. diffvg import error. I found some reference to it here, and solved it with https://github.com/BachiLi/diffvg/issues/12#issuecomment-917303306 .
I also get the camke fail but couldnt solve it with the commenting out solution. (on linux)
I'll make a few remarks about my situation. I'm on Win11, with a poor AMD RX 640 graphics card, used Scoop to install Miniconda3, and noticed red error lines when processing the subprocess.check_call.
In your situation, I will first check if this problem arises from cmake --build . , and then go through the outputs for some red lines.
Thanks! I have little experience doing this, but also like to plat with Words-As-Image..
Actually I also have little experience with neural networks. I'm now puzzled with training issues now. haha
I meant with installing, configuring and such... :) Good luck.
I also get the camke fail but couldnt solve it with the commenting out solution. (on linux)
same question
I also get the camke fail but couldnt solve it with the commenting out solution. (on linux)
same question
You can try Install/update 'build-essential'
I spent days and nights to complete the diffvg compilation on Windows. If anyone wants the wheels, you can contact me +V13862010554. Let's create a group to communicate and exchange about the improvements based on the module together.