-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup Error: Cannot open source file: 'fastxml/splitter.cpp': No such file or directory #13
Comments
Okay, I did not realize it is written for Python 2+. One of the comments mentioned compatibility with Python 3. I changed a few print statements the errors showed, and one import statement, and switched to Linux. Installation now went smoothly. I will get back if I run into further problems. |
It looks like the actual error is that Visual Studio doesn't support -O3 as a compilation flag. Can you open up setup.py and remove '-O3' from the compile_args and try compiling again? |
It is a python 2.7-3 issue. I fixed syntactic issues in trainer.py and the training process ran without problems even from visual studio. The model was saved. However, I seem to be having trouble with the inferencer now (and I don't know how to edit it as it is a Cython/Pyx file.) Here is the error:
File "C:\Users\svajjala\Python36\lib\site-packages\fastxml\fastxml.py", line 21, in init |
Great debugging, I hope you'll submit a PR when done :) One of the changes between Python 2 and Python 3 is the way 'bytes' are represented inside python. In inferencer.pyx, it's reading in data as a str instead of bytes, which it appears the struct object needs. If you'd PR your current work, I'll see if I can get it working on python 3 tonight. |
Okay, while attempting to submit a pull request, I spent a lot of time last night trying to understand why my version and the code on github are different. I finally realized the version I am using is the one installed via pip. That perhaps is still in 2.7! Now, I cloned this repo, and both on Windows and Linux, I see a lot of warnings while installation using setup.py and in the end, when I use the installation to load the module, it shows me: from .inferencer import IForest, LeafComputer, Blender, IForestBlender Like I said, installing via pip works, but with Python 2.7. |
I am trying to run the setup.py and I am running into the following error:
I am on Windows10. Any idea how to work with this?
building 'fastxml.splitter' extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\svajjala\Python36\include -IC:\Users\svajjala\Python36\include -IC:\Users\svajjala\Python36\lib\site-packages\numpy\core\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\cppwinrt" /EHsc /Tpfastxml/splitter.cpp /Fobuild\temp.win-amd64-3.6\Release\fastxml/splitter.obj -O3 -std=c++11
cl : Command line warning D9002 : ignoring unknown option '-O3'
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
splitter.cpp
c1xx: fatal error C1083: Cannot open source file: 'fastxml/splitter.cpp': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\bin\HostX86\x64\cl.exe' failed with exit status 2
The text was updated successfully, but these errors were encountered: