Issue with package versions
First off, thanks for coding and publishing Naive Bayes in TensorFlow. I cloned the projet, created a virtual environment and ran python3 -m pip install -r requirements.txt. I got this error:
ERROR: Could not find a version that satisfies the requirement sip==4.19.3 (from versions: 5.0.0, 5.0.1, 5.1.0, 5.1.1, 5.1.2, 5.2.0, 5.3.0, 5.4.0, 5.5.0, 6.0.0, 6.0.1, 6.0.2, 6.0.3, 6.1.0, 6.1.1, 6.2.0, 6.3.0, 6.3.1, 6.4.0, 6.5.0, 6.5.1, 6.6.0, 6.6.1, 6.6.2, 6.7.0, 6.7.1, 6.7.2, 6.7.3, 6.7.4, 6.7.5, 6.7.6, 6.7.7, 6.7.8, 6.7.9)
ERROR: No matching distribution found for sip==4.19.3
I delete that environment, create a new one, change all == to >= in requirements.txt, and run again. Then it installs and I can run the SKLearn version, but running the TensorFlow version gives:
ImportError: cannot import name 'logsumexp' from 'sklearn.utils.fixes'
I tried setting scikit-learn>=0.12.8 as mentioned in this StackOverflow thread, and it failed with:
error: Command "clang++ -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -ftrapping-math -I/Users/miguel/code/naive_bayes_tensorflow/tfnb3/lib/python3.8/site-packages/numpy/core/include -I/Users/miguel/code/naive_bayes_tensorflow/tfnb3/lib/python3.8/site-packages/numpy/core/include -Ibuild/src.macosx-10.14-x86_64-3.8/numpy/distutils/include -I/Users/miguel/code/naive_bayes_tensorflow/tfnb3/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c sklearn/cluster/_dbscan_inner.cpp -o build/temp.macosx-10.14-x86_64-cpython-38/sklearn/cluster/_dbscan_inner.o -MMD -MF build/temp.macosx-10.14-x86_64-cpython-38/sklearn/cluster/_dbscan_inner.o.d" failed with exit status 1
INFO:
########### EXT COMPILER OPTIMIZATION ###########
INFO: Platform :
Architecture: x64
Compiler : clang
CPU baseline :
Requested : 'min'
Enabled : none
Flags : none
Extra checks: none
CPU dispatch :
Requested : 'max -xop -fma4'
Enabled : none
Generated : none
INFO: CCompilerOpt.cache_flush[857] : write cache to path -> /private/var/folders/vp/8rjwz51s5wx5dptcn89czk8m0000gn/T/pip-install-hxtqs1ip/scikit-learn_e4c3ec65b3dd4e64b82f6ed671cd1d12/build/temp.macosx-10.14-x86_64-cpython-38/ccompiler_opt_cache_ext.py
INFO:
########### CLIB COMPILER OPTIMIZATION ###########
INFO: Platform :
Architecture: x64
Compiler : clang
CPU baseline :
Requested : 'min'
Enabled : none
Flags : none
Extra checks: none
CPU dispatch :
Requested : 'max -xop -fma4'
Enabled : none
Generated : none
INFO: CCompilerOpt.cache_flush[857] : write cache to path -> /private/var/folders/vp/8rjwz51s5wx5dptcn89czk8m0000gn/T/pip-install-hxtqs1ip/scikit-learn_e4c3ec65b3dd4e64b82f6ed671cd1d12/build/temp.macosx-10.14-x86_64-cpython-38/ccompiler_opt_cache_clib.py
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> scikit-learn
note: This is an issue with the package mentioned above, not pip.
How can I run your code?
Hello, thank you very much for using this! Unfortunately the code is now quite old, so you might have to, eg, google logsumexp and see where it was moved to in the later versions. I would start over with an empty virtual environment and go through all import errors, installing the latest versions of everything and changing the APIs as needed.