If I try to install something with pip e.g. python3 -m pip install torch==1.9.1+cu111 --find-links https://download.pytorch.org/whl/torch_stable.html
I get the following error:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 290, in run
with self._build_session(options) as session:
File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 69, in _build_session
if options.cache_dir else None
File "/usr/lib/python3.6/posixpath.py", line 80, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not int
This throws the same error: python3 -m pip install --user torch==1.9.1+cu111 --find-links https://download.pytorch.org/whl/torch_stable.html
.
Installing with sudo
does the job but it does not seem right. How can I fix my pip? I'm on Ubuntu 18.04 and Python 3.6