Skip to content

Installing Python modules on outdated End-Of-Life Bruker CentOS machines #23

Open
@felixsc1

Description

@felixsc1

This is not an issue, just a general tip.

Because CentOS 5 of Bruker consoles is no longer supported, and cannot access secure webpages anymore, I found it very tedious to manually install from source all the required modules for COSplay, and discovered a more convenient solution.
It may sound a bit complicated at first glance, but its actually very simple and will make any future python related software installations much easier:

On a windows machine:

  • Download nginx (https://nginx.org/en/) on another computer in the same network as the Bruker console, which has an up to date OS (e.g. a windows machine, can also be a linux machine).
  • change the server settings in the /conf/nginx.conf file as follows:
server {
    listen 80;
location /packages/ {
        proxy_pass https://pypi.python.org/packages/;
    }
location /pypi/ {
        proxy_pass https://pypi.python.org/simple/;
    }
}
  • start nginx.exe . Thats all for the windows machine.

On the Bruker machine:
Assuming you have installed python 3 from source which includes the pip3 program, alongside the outdated python2 version of CentOS5.

  • Add the following lines to ~/.bashrc, or probably better /root/.bashrc if you need root for installing stuff.
export PIP_INDEX_URL=http://192.168.X.X/pypi/    
export PIP_TRUSTED_HOST=192.168.X.X
export PIP_DISABLE_PIP_VERSION_CHECK=1

(replace the IP with the windows machine's IP)

  • type: pip3 install requests

  • Thats it. Make sure to always use python3 and pip3 (instead of python, pip) to install anything.
    As long as the windows machine running the local proxy is connected, you no longer have to manually download/install anything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions