title: Unable to create virtual environment on CentOS 7.8 and python3.6
body: <p>I have two servers that are running CentOS 7.8 with all the latest patches as of the date of this post. On one server I can create a venv, and on the other I get an error. Here is the command used to create the venv:</p>
  
  <pre><code>python3.6 -m venv venv
  </code></pre>
  
  <p>The error is:</p>
  
  <pre><code>Error: Command '['/root/venv/bin/python3.6', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
  </code></pre>
  
  <p>So it seems there is a problem after the venv is created. In fact, it makes the links to the python interpreters in venv/bin, but the lib64/python3.6 and lib/python3.6 directories that are created have only empty site-packages in them. I get the problem whether running the command with root privileges (as above) or as a non-privileged user. On the other system, which is not quite the same hardware but very similar, I get no errors. </p>
  
  <p>I have tried a bunch of things including completely uninstalling all the python3 rpms and reinstalling them on both systems. The python3 modules installed are:
  python3, python3-devel, python3-libs, python3-other-rpm-macros, python3-pip, python3-rpm-generators, python3-setuptools, python3-tkinter, python3-wheel. All these are installed using the centos repos.</p>
  
  <p>I have searched the internet and one thing that works is to use --no-pip. However, not surprisingly, if I do that I get a venv with no pip, which does not work very well. The version of pip that is installed with the rpm is version 9.0.3. However, I have tried upgrading pip:</p>
  
  <pre><code>python3.6 -m pip install --upgrade pip
  </code></pre>
  
  <p>This installs pip 20.1. Interestingly, it is installed in /usr/local/lib/python/site-packages. In any event, it doesn't change anything and I get essentially the same error message. </p>
  
  <p>I have even gone as far as rsyncing the /usr/lib/python3.6 and /usr/lib64/python3.6 (using -avu --delete) on the two servers so that they are identical. All to no avail. I am at a loss to know what to do.</p>
  
  <p>I can of course hack things to make them work, but since I am using this to automatically build test environments I really need to get it working automatically. Suggestions would be greatly appreciated.</p>