Create a Python3 virtual environment
If you are connecting to the network, running the sudo /opt/Citrix/VDA/bin/xdping
or /opt/Citrix/VDA/sbin/enable_ldaps.sh
command can create a Python3 virtual environment. However, if the commands fail to create a Python3 virtual environment, you can create it manually even without a network connection. This article details the prerequisites and steps to create a Python3 virtual environment without a network connection.
Prerequisites
- You must have administrative privileges to access the
/opt/Citrix/VDA/sbin/ctxpython3
directory. - The wheel files of
Python3
packages are in place. You can download the wheel files from https://pypi.org/.
Create a Python3 virtual environment
Complete the following steps to create a Python3 virtual environment:
-
Install Python3 dependencies.
For RHEL:
yum -y install python36-devel krb5-devel gcc <!--NeedCopy-->
Note:
You might have to enable a particular repository to install some dependencies. For RHEL 7, run the
subscription-manager repos --enable rhel-7-server-optional-rpms
command. For RHEL 8, run thesubscription-manager repos --enable=rhel-8-for-x86_64-appstream-rpms
command.For Ubuntu\Debian:
apt-get -y install python3-dev python3-pip python3-venv libkrb5-dev <!--NeedCopy-->
For SUSE:
zypper -i -n install python3-devel python3-setuptools krb5-devel gcc libffi48-devel <!--NeedCopy-->
Note:
You might have to enable the
SUSE_Linux_Enterprise_Software_Development_Kit_12_SP5_x86_64
repository to install some dependencies. -
Create a Python3 virtual environment.
For RHEL, Ubuntu, Debian:
sudo python3 -m venv /opt/Citrix/VDA/sbin/ctxpython3 <!--NeedCopy-->
For SUSE:
sudo python3 -m venv /opt/Citrix/VDA/sbin/ctxpython3 sudo /opt/Citrix/VDA/sbin/ctxpython3/bin/python3 -m pip install setuptools==40.6.2 <!--NeedCopy-->
-
Install LDAPS dependencies.
For RHEL, Ubuntu, Debian:
sudo /opt/Citrix/VDA/sbin/ctxpython3/bin/python3 -m pip install cffi == 1.14.2 cryptography == 3.1 decorator == 4.4.2 gssapi==1.6.2 ldap3==2.8.1 netifaces == 0.10.9 pg8000 == 1.17.0 psutil == 5.8.0 pyasn1 == 0.4.8 pycparser == 2.20 scramp == 1.2.0 six == 1.15.0 termcolor == 1.1.0 <!--NeedCopy-->
For SUSE:
sudo /opt/Citrix/VDA/sbin/ctxpython3/bin/python3 -m easy_install cffi == 1.14.2 cryptography == 3.1 decorator == 4.4.2 gssapi==1.6.2 ldap3==2.8.1 netifaces == 0.10.9 pg8000 == 1.17.0 psutil == 5.8.0 pyasn1 == 0.4.8 pycparser == 2.20 scramp == 1.2.0 six == 1.15.0 termcolor == 1.1.0 <!--NeedCopy-->
-
Install
XDPing
dependencies.For RHEL, Ubuntu, Debian:
sudo /opt/Citrix/VDA/sbin/ctxpython3/bin/python3 -m pip install cffi == 1.14.2 cryptography == 3.1 decorator == 4.4.2 gssapi==1.6.2 ldap3==2.8.1 netifaces == 0.10.9 pg8000 == 1.17.0 psutil == 5.8.0 pyasn1 == 0.4.8 pycparser == 2.20 scramp == 1.2.0 six == 1.15.0 termcolor == 1.1.0 sudo /opt/Citrix/VDA/sbin/ctxpython3/bin/python3 -m pip install /opt/Citrix/VDA/sbin/ctxpython3/packages/xdping-*.whl <!--NeedCopy-->
For SUSE:
sudo /opt/Citrix/VDA/sbin/ctxpython3/bin/python3 -m easy_install cffi == 1.14.2 cryptography == 3.1 decorator == 4.4.2 gssapi==1.6.2 ldap3==2.8.1 netifaces == 0.10.9 pg8000 == 1.17.0 psutil == 5.8.0 pyasn1 == 0.4.8 pycparser == 2.20 scramp == 1.2.0 six == 1.15.0 termcolor == 1.1.0 sudo /opt/Citrix/VDA/sbin/ctxpython3/bin/python3 -m easy_install /opt/Citrix/VDA/sbin/ctxpython3/packages/xdping-*.whl <!--NeedCopy-->