pip venv command works with normal user but not under root !

Hi I created a virtual environment with python3.8 pip.

mkdir pipvm
cd pipvm
cd bin

(pyt38) [redhat@localhost bin]$ source activate
(pyt38) [redhat@localhost bin]$

I am entering the pip virtual environment.

In this environment, I need to install with the steps in the following document.

but I get this error.

Traceback (most recent call last):
File “/home/redhat/rtddocker/pipvm/pyt38/lib64/python3.8/site-packages/docker/api/client.py”, line 214, in _retrieve_server_version
return self.version(api_version=False)[“ApiVersion”]
File “/home/redhat/rtddocker/pipvm/pyt38/lib64/python3.8/site-packages/docker/api/daemon.py”, line 181, in version
return self._result(self._get(url), json=True)
File “/home/redhat/rtddocker/pipvm/pyt38/lib64/python3.8/site-packages/docker/utils/decorators.py”, line 46, in inner
return f(self, *args, **kwargs)
File “/home/redhat/rtddocker/pipvm/pyt38/lib64/python3.8/site-packages/docker/api/client.py”, line 237, in _get
return self.get(url, **self._set_request_timeout(kwargs))
File “/home/redhat/rtddocker/pipvm/pyt38/lib64/python3.8/site-packages/requests/sessions.py”, line 600, in get
return self.request(“GET”, url, **kwargs)
File “/home/redhat/rtddocker/pipvm/pyt38/lib64/python3.8/site-packages/requests/sessions.py”, line 587, in request
resp = self.send(prep, **send_kwargs)
File “/home/redhat/rtddocker/pipvm/pyt38/lib64/python3.8/site-packages/requests/sessions.py”, line 701, in send
r = adapter.send(request, **kwargs)
File “/home/redhat/rtddocker/pipvm/pyt38/lib64/python3.8/site-packages/requests/adapters.py”, line 547, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: (‘Connection aborted.’, PermissionError(13, ‘Permission denied’))

It gives an authorization error.

This time I have to root

(pyt38) [root@localhost readthedocs.org]#
When I do inv docker.build the inv command does not seem to be installed. What could be the reason why inv command does not appear under root but it appears in normal user, how can I fix this error.

I am trying to use it with normal user because they told me not to use it in pip root environment but this time I get authorization error. I need your help on this issue.

The error you are receiving has nothing to with Python or the virtual environment. The program you are trying to run makes an attempt to connect to the Docker daemon, and that request fails due to lack of permissions. You’ll need to learn how to allow a non-root user to connect to the Docker daemon on your system.

Also, the steps you listed at the top of your post for ‘creating the virtual environment’ aren’t complete, and don’t match the name of venv you activated. When asking for assistance on a forum, be sure to include the complete and exact commands you typed (and their results, when that is relevant).