Exception:
Traceback (most recent call last):
File “/home/yu/anaconda3/envs/TRTC/lib/python3.6/site-packages/pip/basecommand.py”, line 215, in main
status = self.run(options, args)
File “/home/yu/anaconda3/envs/TRTC/lib/python3.6/site-packages/pip/commands/list.py”, line 157, in run
packages = self.get_outdated(packages, options)
File “/home/yu/anaconda3/envs/TRTC/lib/python3.6/site-packages/pip/commands/list.py”, line 168, in get_outdated
dist for dist in self.iter_packages_latest_infos(packages, options)
File “/home/yu/anaconda3/envs/TRTC/lib/python3.6/site-packages/pip/commands/list.py”, line 168, in
dist for dist in self.iter_packages_latest_infos(packages, options)
File “/home/yu/anaconda3/envs/TRTC/lib/python3.6/site-packages/pip/commands/list.py”, line 197, in iter_packages_latest_infos
with self._build_session(options) as session:
File “/home/yu/anaconda3/envs/TRTC/lib/python3.6/site-packages/pip/basecommand.py”, line 69, in _build_session
if options.cache_dir else None
File “/home/yu/anaconda3/envs/TRTC/lib/python3.6/posixpath.py”, line 78, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not int
Traceback (most recent call last):
File “/home/yu/anaconda3/envs/TRTC/bin/pip”, line 6, in
sys.exit(pip.main())
File “/home/yu/anaconda3/envs/TRTC/lib/python3.6/site-packages/pip/init.py”, line 249, in main
return command.main(cmd_args)
File “/home/yu/anaconda3/envs/TRTC/lib/python3.6/site-packages/pip/basecommand.py”, line 251, in main
timeout=min(5, options.timeout)) as session:
File “/home/yu/anaconda3/envs/TRTC/lib/python3.6/site-packages/pip/basecommand.py”, line 69, in _build_session
if options.cache_dir else None
File “/home/yu/anaconda3/envs/TRTC/lib/python3.6/posixpath.py”, line 78, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not int
Solution: (you can replace python with python3)
curl https://bootstrap.pypa.io/get-pip.py | python –
Guess the reason for the error is: setuptools and pip versions do not correspond, so upgrade the pip will be fine.
Read More:
- [Solved] pycocotools Install Error: ERROR: Error expected str, bytes or os.PathLike object, not NoneType while executing
- Typeerror in Python regular expression: expected string or bytes like object
- [Solved] python-sutime Error: the JSON object must be str, bytes or bytearray, not ‘java.lang.String‘
- [Solved] Python3.9 Pycropto RSA Error: TypeError: can’t concat str to bytes
- [Solved] Python Error: TypeError: write() argument must be str, not bytes
- [How to Solve] Python TypeError: ‘int‘ object is not subscriptable
- [Solved] TypeError: Object of type ‘bytes’ is not JSON serializable
- [Solved] TypeError: unsupported operand type(s) for /: ‘str‘ and ‘int‘
- Python 3.7 Error: AttributeError: ‘str‘ object has no attribute ‘decode‘ [How to Solve]
- Python TypeError: Unrecognized value type: <class ‘str‘>dateutil.parser._parser.ParserError: Unknow
- Windows10 DOTA_devkit Error: TypeError: ‘>=‘ not supported between instances of ‘NoneType‘ and ‘str‘
- Python Openyxl Error: AttributeError: ‘int‘ object has no attribute ‘upper‘ [How to Solve]
- Djangorestframework-simplejwt: ‘str‘ object has no attribute ‘decode‘ [Solved]
- [Solved] RuntimeError: unexpected EOF, expected 73963 more bytes. The file might be corrupted.
- How to Solve PIP3 error After upgrading pip3 install –upgrade pip
- Django Issues: TypeError: “Settings” object is irreversible
- Python scatter chart error: TypeError: object of type ‘NoneType’ has no len()
- Mac Upgrade pip Error OSError: [Errno 13] Permission denied: ‘/Library/Python/2.7/site-packages/pip-9.0.1-py2….
- [Solved] RuntimeError: scatter(): Expected dtype int64 for index
- [Solved] RuntimeError: gather(): Expected dtype int64 for index