I'm reproducing a project code and trying to execute it locally.
It uses Python 3.6 and old packages dating to 2017 and PIP struggles to install them and returned error codes which were 40 pages long.
My friend suggested me to use Anaconda to setup a virtual environment and use conda environment to install those old packages and python 3.6 and it was a success.
I cloned the code from github and tried running it as per the instructions in the readme and I've been encountering errors with almost every import statement that calls a local package.
These are my folder contents (not the full list but only showed enough contents for error debugging):
<repository-root>/
├─ data/
│ ├─ dataset_2017/
│ │ ├─ dataset_2017_8_formatted_macrosremoved/
│ │ └─ libtoolingfeatures_for_public_testing/
│ └─ ClassificationModels/
├─ evaluations/
│ ├─ blackbox/
│ │ └─ attack/
│ ├─ tutorial_classification.py
│ ├─ tutorial_classification_2.py
│ └─ learning/
│ ├─ post_learning_steps/
│ └─ rf_usenix/
├─ classification/
├─ featureextractionV2/
| |- __init__.py
├─ rnn_css/
├─ UnitTests/
└─ PyProject/
For Example, if I want to run a classification test, I use
conda activate myenv
cd .\evaluations\
python.exe tutorial_classification.py
It returns this error:
python.exe tutorial_classification.py
Traceback (most recent call last):
File "tutorial_classification.py", line 33, in <module>
from featureextractionV2.StyloFeaturesProxy import StyloFeaturesProxy
ModuleNotFoundError: No module named 'featureextractionV2'
You can notice that featureextractionV2 does have an init.py file yet it doesn't recognise it as a module
The same thing happens when I try to run other tests in other folders and running those files returns the same error saying that no module named evasion
For more details
I'm running Windows 11 and I use PyCharm Community as my editor.