bug or genuine issue with identifying dependencies

128 Views Asked by At

I am quite confused by this message from Snyk. It seems I have all dependencies I need.

+ pip3 install -r requirements.txt
Requirement already satisfied: numpy==1.21.5 in ./venv/lib/python3.9/site-packages (from -r requirements.txt (line 1)) (1.21.5)
Requirement already satisfied: pandas==1.4.1 in ./venv/lib/python3.9/site-packages (from -r requirements.txt (line 2)) (1.4.1)
Requirement already satisfied: matplotlib==3.5.1 in ./venv/lib/python3.9/site-packages (from -r requirements.txt (line 3)) (3.5.1)
Requirement already satisfied: scipy==1.8.0 in ./venv/lib/python3.9/site-packages (from -r requirements.txt (line 4)) (1.8.0)
....
....

but when I run snyk scan - it says(!)

2022-04-04T21:59:55.434Z snyk:run-test Error running test {
  error: REQUIRED_PACKAGES_MISSING_ERROR: Required packages missing: numpy, pandas, matplotlib, scipy

Really struggling to understand where the issue is. Could anyone please suggest?

1

There are 1 best solutions below

0
On

Could be a few reasons:

  • Changing the default python version, such as replacing /usr/bin/python with python3 (it was python2) could resolve it
  • Use the --skip-unresolved option to the command line could ignore those libraries
  • Make sure those dependencies have been installed locally (Ran pipenv install instead of pipenv update as the packages need to be installed locally for instance if you are using pipenv)
  • if it still doesn't resolve the issue add the -d flag to get the full logs

Hope it helps