Computer powered off while installing sk-learn from pip. Now cannot uninstall or import because "line contains null byte"

200 views Asked by At

So I was installing scikit-learn == 0.18.rc2 using command prompt on my Windows 8.1 computer. Unfortunately my battery got disconnected while pip was uninstalling the previous version. When I powered on my computer I thought about uninstalling the package and reinstalling it again but pip threw the error "line contains NULL byte". I also checked by importing the package on python (3.4.4) but that gives a similar error "source code string cannot contain null bytes".

My question is how do I uninstall the package with the given error or if there is a way to reinstall scikit-learn without losing all of other packages I have installed using pip.

Thanks!

1

There are 1 answers

0
Daniel Lee On
pip install -U scikit-learn --force-reinstall

or, to answer your question

pip uninstall scikit-learn

Else, navigate to where the files are installed and delete them, then try these commands again.