The steps leading to the problem is as follows:
I installed a package using pip. The package is here and its install doc is here. The command I used is
pip install --upgrade tensorflow-graphics-gpu
Because I don't have super user privilege, the package was installed in my user space. pip prompted me for that.
I uninstalled the package using
pip uninstall tensorflow-graphics-gpu
I started python3 and type
import tensorflow as tf
This statement worked fine before. But this time, python quits with an error:
Segmentation fault (core dumped)
This is a screenshot: enter image description here.
The environment is as follows:
- A remote Linux. Core version 5.8.0. I am not not a super user.
- Python 3.8.6
- CUDA 11.1
- CPU: Core i9-10900K
- nVidia RTX GPU
The same error crashes python if I tried to import PyTorch. The sys admin is very disagreeable so I can get no help from him, not to mention upgrading drivers or reinstalling python. I tried to clear cashes in my user space that I know of, but I didn't have luck. I searched internet for a solution but of no avail. Can someone please tell me how to fix this issue? Thanks a lot.
CodePudding user response:
I had some similar issues working on a remote system. I would recommend installing miniconda under your user directory. The process is quite straightforward. I have included a link below.
Essentially, you're just installing python again locally. Then you can use conda to manage modules and even create specific environments for different projects/use cases. You won't need root privileges to make changes.
https://docs.conda.io/projects/conda/en/latest/user-guide/install/linux.html
CodePudding user response:
I tried to clear cashes in my user space that I know of, but I didn't have luck.
It seems pretty clear that something in your $HOME
directory is still being used, and is causing the system python
to crash.
To discover what that something is, you can look at which files are being opened using this command:
strace -e file python -c 'import tensorflow'
Once you know which files are being opened, remove/reinstall corresponding packages, and you should be back in business.