Forums

Pip Install Not Working. Can't Uninstall. Please Help.

I'm using the bash terminal to install fastai for use in my webapp. Everytime I try to install, it gets about halfway through, and then I get an error message that says "Your console is printing so much that it's interfering with other users, so it has been closed". I've learned that it's specifically the pytorch installation that causes a failure.

I upgraded to a paid plain, then went into the tmp directory and deleted all the partially downloaded files to clear up space, then I tried downloading pytorch separately. I think this may have worked, but now when running 'pip install fastai', I just see 'collecting torch' until I get "ERROR: Could not install packages due to an EnvironmentError: [Errno 122] Disk quota exceeded" (even when I haven't exceeded my disk quota). Pytorch is still causing an error, the error is just different.

Do you know how to fix? Does this have something to do with it? https://github.com/rtfd/readthedocs.org/issues/5516

Many thanks.

The "disk quota exceeded" message is happening because PyTorch is trying to use too much disk space. When you pip install something, it first downloads the package, then it unpacks it, then it copies files from the unpacked version into the place where they need to be for Python to access them. So in theory, it could temporarily use up to three times the space that the final install will require before it finally deletes the downloaded stuff. (Two times is more typical, but three times in the worst case.)

When a pip install fails, it can leave stuff lying around in other places, not just in /tmp, so the first thing to do to get this all working would be to make sure that you're not using up disk space on stuff you don't want. This help page has some commands you can use to track down unwanted files.

Once you're done that, the way to avoid the "printing too much" issue is to redirect the output of the pip install to a file so that it doesn't hit the console. So, for example, if you would normally use this command:

pip3.6 install fastai

...to install the package you need, you should use this instead:

pip3.6 install fastai > /tmp/install-log.txt

That will put the non-error output into the specified file in /tmp, but error messages will go to the console so that you can see them.

Thank you. I successfully installed fastai. I have one more problem now. I'm unable to run any code that uses the fastai library, even when I'm sure I'm on the correct virtual environment. The error I see is the following:

"torch cuda : 9.0.176 / is Not available === Hardware === No GPUs available === Environment === platform : Linux-4.4.0-1075-aws-x86_64-with-debian-stretch-sid distro : #85 SMP Fri Feb 15 13:52:12 UTC 2019 conda env : Unknown ... /home/thedstrat94/.virtualenvs/myvirtualenv/lib/python3.7/site-packages no supported gpus found on this system". Do I need to find a CPU version of pytorch, delete my existing versions, then recompile fastai? Appreciate the help.

enter image description here

You'll have to check the documentation of fastai about how to use it without a GPU. You may need to recompile, or perhaps it's just an option you can specify at runtime.

It was an easy fix! Just had to reload the webapp. Thanks for your help.

Ah, great! Glad you got to a solution :-)