I ran the command pip install coverage and it appears to have installed correctly.
Frodo:Triangle567 tarikkdiry$ pip install coverage
Collecting coverage
Using cached https://files.pythonhosted.org/packages/c7/d0/337673c08f5b0cc7ada3dfe2a998ae8a97d482722045644be3d79bbcbe05/coverage-4.5.1-cp37-cp37m-macosx_10_13_x86_64.whl
Installing collected packages: coverage
Successfully installed coverage-4.5.1
However, after running coverage on one of my test files, I receive this error:
Frodo:Triangle567 tarikkdiry$ coverage run testtriangle.py
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/bin/coverage", line 7, in <module>
from coverage.cmdline import main
ModuleNotFoundError: No module named 'coverage.cmdline'; 'coverage' is not a package
Frodo:Triangle567 tarikkdiry$
I have tried uninstalling every python package and reinstalling but to no success. I have tried this on another machine and can confirm the test file is working properly.
EDIT: After running pip3 check coverage and pip3 show coverage
pip3 check coverage:
No broken requirements found.
pip3 show coverage
Name: coverage
Version: 4.5.1
Summary: Code coverage measurement for Python
Home-page: https://bitbucket.org/ned/coveragepy
Author: Ned Batchelder and 100 others
Author-email: ned@nedbatchelder.com
License: Apache 2.0
Location: /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages
Requires:
Required-by: