aiforsec / CyNER

Cyber Security concepts extracted from unstructured threat intelligence reports using Named Entity Recognition
MIT License
79 stars 28 forks source link

Problem in prerequisite installation for CyNER (with Matplotlib package). #8

Open hoangcuongnguyen2001 opened 1 year ago

hoangcuongnguyen2001 commented 1 year ago

I am currently trying to install CyNER in an Anaconda environment (Python 3.10). However when I tried to install the model directly through GitHub (as in the instruction), I got this problem with Matplotlib:


 copying lib\matplotlib\mpl-data\stylelib\_classic_test_patch.mplstyle -> build\lib.win-amd64-cpython-310\matplotlib\mpl-data\stylelib
      copying lib\matplotlib\mpl-data\fonts\ttf\STIXNonUniBol.ttf -> build\lib.win-amd64-cpython-310\matplotlib\mpl-data\fonts\ttf
      UPDATING build\lib.win-amd64-cpython-310\matplotlib\_version.py
      set build\lib.win-amd64-cpython-310\matplotlib\_version.py to '3.3.1'
      running build_ext
      Building freetype in build\freetype-2.6.1
      msbuild build\freetype-2.6.1\builds\windows\vc2010\freetype.sln /t:Clean;Build /p:Configuration=Release;Platform=x64
      error: command 'msbuild' failed: None
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  Rolling back uninstall of matplotlib
  Moving to c:\users\hoang\anaconda3\lib\site-packages\__pycache__\pylab.cpython-310.pyc
   from C:\Users\hoang\AppData\Local\Temp\pip-uninstall-k9zjxrv1\pylab.cpython-310.pyc
  Moving to c:\users\hoang\anaconda3\lib\site-packages\matplotlib-3.7.0-py3.10-nspkg.pth
   from C:\Users\hoang\AppData\Local\Temp\pip-uninstall-dx5xyrfv\matplotlib-3.7.0-py3.10-nspkg.pth
  Moving to c:\users\hoang\anaconda3\lib\site-packages\matplotlib-3.7.0.dist-info\
   from C:\Users\hoang\anaconda3\Lib\site-packages\~atplotlib-3.7.0.dist-info
  Moving to c:\users\hoang\anaconda3\lib\site-packages\matplotlib\
   from C:\Users\hoang\anaconda3\Lib\site-packages\~atplotlib
  Moving to c:\users\hoang\anaconda3\lib\site-packages\mpl_toolkits\axes_grid1\
   from C:\Users\hoang\anaconda3\Lib\site-packages\mpl_toolkits\~xes_grid1
  Moving to c:\users\hoang\anaconda3\lib\site-packages\mpl_toolkits\axisartist\
   from C:\Users\hoang\anaconda3\Lib\site-packages\mpl_toolkits\~xisartist
  Moving to c:\users\hoang\anaconda3\lib\site-packages\mpl_toolkits\mplot3d\
   from C:\Users\hoang\anaconda3\Lib\site-packages\mpl_toolkits\~plot3d
  Moving to c:\users\hoang\anaconda3\lib\site-packages\pylab.py
   from C:\Users\hoang\AppData\Local\Temp\pip-uninstall-dx5xyrfv\pylab.py
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> matplotlib

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

I have tried to create a new environment (without any libraries from Python) to install the program again, but this issue still persists. So what would you recommend me to do in this case to get CyNER running?

Baker-101 commented 1 year ago

I had the same issue earlier, the issue lies in a different library. You have to install ta-lib, which is a whole process and a half, the process to do so is in its library: https://github.com/TA-Lib/ta-lib-python

Baker-101 commented 1 year ago

additionally, based off the error where there is no msbuild, you may have to do the pip installation for the directory inside developer command prompt for whichever VS studio version you have, that's what I did