在虚拟环境中升级pip

时间:2021-07-18 04:36:07

标签: python pip python-venv

我尝试在虚拟环境中升级 pip。 我有如下错误。

Exception:
Traceback (most recent call last):
  File "/home/itc/intel/training_extensions/venv/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/itc/intel/training_extensions/venv/lib/python3.6/site-packages/pip/commands/install.py", line 290, in run
    with self._build_session(options) as session:
  File "/home/itc/intel/training_extensions/venv/lib/python3.6/site-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

可能有什么问题?

1 个答案:

答案 0 :(得分:0)

有时python无法识别您的语句,因此会出现这些错误。

试试这个:- Python -m pip install --upgrade pip