Running pip in a venv gives errors

My setup::
Windows 10
python3.8
VS Code

I’m attempting to setup a python 3.8 virtual environment in Windows. I’m receiving the following error while executing the pip command when in my (venv) environment.

These are steps I took to create the venv:

python -m venv C:\Users\Rich\Documents\dev\python\venv

when in the Scripts directory I did - activate.bat

Now my terminal in VS Code shows (venv)

I then executed pip freeze which gives the following error:
(venv) C:\Users\Rich\Documents\dev\python\venv\Scripts>pip freeze
Traceback (most recent call last):

  • File “C:\Users\Rich\AppData\Local\Programs\Python\Python38\Lib\runpy.py”, line 192, in _run_module_as_main*
  • return _run_code(code, main_globals, None,*
  • File “C:\Users\Rich\AppData\Local\Programs\Python\Python38\Lib\runpy.py”, line 85, in _run_code*
  • exec(code, run_globals)*
  • File “C:\Users\Rich\Documents\dev\python\venv\Scripts\pip.exe_main_.py”, line 9, in *
    TypeError: ‘module’ object is not callable

how do I execute pip while in a venv?

I seemed to have fixed my pip issue. I followed this link:

1 Like