Upgrade pip in Bitnami Odoo Stack

Keywords: General - Other - How to - Other
Description:
I am finding trouble while trying to install the python library cryptography in Bitnami Odoo Stack in Widnows. Looking through, I found that upgrading pip could solved the issue.

So I tried to upgrade pip in the Bitnami Odoo Stack but the following error ocurred.

C:\Bitnami\odoo-13.0.20210315-0\python\Scripts>pip.exe install --upgrade pip
Collecting pip
  Using cached https://files.pythonhosted.org/packages/ac/cf/0cc542fc93de2f3b9b53cb979c7d1118cffb93204afb46299a9f858e113f/pip-21.1-py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 9.0.1
    Uninstalling pip-9.0.1:
      Successfully uninstalled pip-9.0.1
  Rolling back uninstall of pip
Exception:
Traceback (most recent call last):
  File "c:\bitnami\odoo-1~1.202\python\lib\site-packages\pip-9.0.1-py3.7.egg\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\bitnami\odoo-1~1.202\python\lib\site-packages\pip-9.0.1-py3.7.egg\pip\commands\install.py", line 342, in run
    prefix=options.prefix_path,
  File "c:\bitnami\odoo-1~1.202\python\lib\site-packages\pip-9.0.1-py3.7.egg\pip\req\req_set.py", line 784, in install
    **kwargs
  File "c:\bitnami\odoo-1~1.202\python\lib\site-packages\pip-9.0.1-py3.7.egg\pip\req\req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "c:\bitnami\odoo-1~1.202\python\lib\site-packages\pip-9.0.1-py3.7.egg\pip\req\req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "c:\bitnami\odoo-1~1.202\python\lib\site-packages\pip-9.0.1-py3.7.egg\pip\wheel.py", line 462, in move_wheel_files
    generated.extend(maker.make(spec))
  File "c:\bitnami\odoo-1~1.202\python\lib\site-packages\pip-9.0.1-py3.7.egg\pip\_vendor\distlib\scripts.py", line 372, in make
    self._make_script(entry, filenames, options=options)
  File "c:\bitnami\odoo-1~1.202\python\lib\site-packages\pip-9.0.1-py3.7.egg\pip\_vendor\distlib\scripts.py", line 276, in _make_script
    self._write_script(scriptnames, shebang, script, filenames, ext)
  File "c:\bitnami\odoo-1~1.202\python\lib\site-packages\pip-9.0.1-py3.7.egg\pip\_vendor\distlib\scripts.py", line 212, in _write_script
    launcher = self._get_launcher('t')
  File "c:\bitnami\odoo-1~1.202\python\lib\site-packages\pip-9.0.1-py3.7.egg\pip\_vendor\distlib\scripts.py", line 351, in _get_launcher
    result = finder(distlib_package).find(name).bytes
AttributeError: 'NoneType' object has no attribute 'bytes'
You are using pip version 9.0.1, however version 21.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

Does anyone know how to solve it?

Thanks in advance.

Hello @annahernandez476,

That error should be coming from having another pip version already installed. Please try the solutions detailed in these two GH issues:

Regards,
Francisco de Paz

Thanks for your reply. I will definitely try this.