Question: The project when I previously build on my laptop it works but when I was trying to build this project on my pc it shows docker.errors.DockerException: Error while fetching server API version: HTTPConnection.request() got an unexpected keyword argument 'chunked'. My docker-compose.yml file looks like version: "3.3" services: db: image: postgres:14.0-alpine3.14 restart: always environment: POSTGRES_DB: ${DB_NAME} POSTGRES_USER: ${DB_USER} POSTGRES_PASSWORD: ${DB_PASSWORD} volumes: - korean_mbc_appointment:/var/lib/postgresql/data web: build: ./ restart: always command: "python manage.py runserver 0.0.0.0:8000" volumes: - ./:/code expose: - 421 # ports: # - "420:8000" depends_on: - db nginx: build: ./nginx restart: always volumes: - ./static:/code/static - ./media:/code/media ports: - "420:80" depends_on: - web volumes: korean_mbc_appointment:  The issue when I was trying to build the project looks like sudo docker-compose -f docker-compose.yml up -d --build Traceback (most recent call last): File "/usr/lib/python3/dist-packages/docker/api/client.py", line 214, in _retrieve_server_version return self.version(api_version=False)["ApiVersion"] File "/usr/lib/python3/dist-packages/docker/api/daemon.py", line 181, in version return self._result(self._get(url), json=True) File "/usr/lib/python3/dist-packages/docker/utils/decorators.py", line 46, in inner return f(self, *args, **kwargs) File "/usr/lib/python3/dist-packages/docker/api/client.py", line 237, in _get return self.get(url, **self._set_request_timeout(kwargs)) File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 602, in get return self.request("GET", url, **kwargs) File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.10/dist-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 790, in urlopen response = self._make_request( File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 496, in _make_request conn.request( TypeError: HTTPConnection.request() got an unexpected keyword argument 'chunked' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/bin/docker-compose", line 8, in <module> sys.exit(main()) File "/usr/local/lib/python3.10/dist-packages/compose/cli/main.py", line 81, in main command_func() File "/usr/local/lib/python3.10/dist-packages/compose/cli/main.py", line 200, in perform_command project = project_from_options('.', options) File "/usr/local/lib/python3.10/dist-packages/compose/cli/command.py", line 60, in project_from_options return get_project( File "/usr/local/lib/python3.10/dist-packages/compose/cli/command.py", line 152, in get_project client = get_client( File "/usr/local/lib/python3.10/dist-packages/compose/cli/docker_client.py", line 41, in get_client client = docker_client( File "/usr/local/lib/python3.10/dist-packages/compose/cli/docker_client.py", line 170, in docker_client client = APIClient(use_ssh_client=not use_paramiko_ssh, **kwargs) File "/usr/lib/python3/dist-packages/docker/api/client.py", line 197, in __init__ self._version = self._retrieve_server_version() File "/usr/lib/python3/dist-packages/docker/api/client.py", line 221, in _retrieve_server_version raise DockerException( docker.errors.DockerException: Error while fetching server API version: HTTPConnection.request() got an unexpected keyword argument 'chunked' 

Answer: My Operating system is ubuntu 22 and running sudo apt install docker-compose-v2 did not work for me. The following command works for me. *Uninstall old docker-compose package sudo apt remove docker-compose  Install docker-compose-plugin package sudo apt install docker-compose-plugin  After installing this you are unable to run docker-compose <action> command. To run you have to use following command. docker compose <action>