User Tools

Site Tools


working_with_python

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
working_with_python [2024/04/22 10:51] jansenworking_with_python [2025/04/07 15:07] (current) – Modified example for RHEL9 jansen
Line 73: Line 73:
 === Method 1 - subsection Incompatible versions === === Method 1 - subsection Incompatible versions ===
  
-Unfortunately, python's 'user' directory is independent of the operating system version, but most of the compute nodes including the LOFAR cluster, run RedHat Enterprise Linux, which is sufficiently different to cause packages installed on the desktop not to work all the time.+Unfortunately, python's 'user' directory is independent of the operating system version, but most of the compute nodes including VDESK, LOFAR cluster and other compute nodes, run RedHat Enterprise Linux, which is sufficiently different to cause packages installed on the desktop not to work all the time.
  
 In cases like this, it might be necessary to create a separate python user directory structure for those machines: In cases like this, it might be necessary to create a separate python user directory structure for those machines:
Line 79: Line 79:
 Add to your .bashrc something like this: Add to your .bashrc something like this:
   if [ ! -f /etc/fedora-release ]; then   if [ ! -f /etc/fedora-release ]; then
-    export PYTHONUSERBASE=$HOME/.local-rhel7+    export PYTHONUSERBASE=$HOME/.local-rhel9
   fi   fi
 For users of the ''tcsh'' shell, add this to your .tcshrc in stead: For users of the ''tcsh'' shell, add this to your .tcshrc in stead:
   if (! -f /etc/fedora-release) then   if (! -f /etc/fedora-release) then
-    setenv PYTHONUSERBASE $HOME/.local-rhel7+    setenv PYTHONUSERBASE $HOME/.local-rhel9
   endif   endif
  
-And make sure to create that directory ~/.local-rhel7. Now the pip --user commands on RHEL7 machines will install into that newly created directory in stead of the default one used by the desktop systems.+And make sure to create that directory ~/.local-rhel9. Now the pip --user commands on RHEL9 machines will install into that newly created directory in stead of the default one used by the desktop systems.
  
 ==== METHOD 2: venv ==== ==== METHOD 2: venv ====
working_with_python.1713783065.txt.gz · Last modified: by jansen