How to Check for the Log File When an Error Occurs While Installing a Python Package

How to Check for the Log File When an Error Occurs While Installing a Python Package

I'm trying to install Networkit package in Windows subsystem for linux. I did

python3.7 -m pip install networkit

and the following error occurs

compilation terminated.
    CMakeFiles/ recipe for target 'CMakeFiles/ failed
    make[2]: *** [CMakeFiles/ Error 1
    CMakeFiles/Makefile2:1395: recipe for target 'CMakeFiles/ failed
    make[1]: *** [CMakeFiles/ Error 2
    Makefile:148: recipe for target 'all' failed
    make: *** [all] Error 2
    Build tool returned an error, exiting setup.py
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pq3f9z1t/networkit/setup.py'"'"'; __file__='"'"'/tmp/pip-install-pq3f9z1t/networkit/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-zex8gap3/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/user/.local/include/python3.7m/networkit Check the logs for full command output.

I'm not sure where to look for the logs. Could someone suggest how to find the path in which I have to look for the log file?

1

1 Answer

You can specify a log file at the command line when running pip using the --log LOG_FILE argument. For example, pip install click --log LOG_FILE. Taken from this answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Sarah Jenkins
Author

Sarah Jenkins

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.