Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
felixsc1 opened this issue Dec 12, 2017 · 3 comments
Open

Comments

@felixsc1
Copy link
Member

felixsc1 commented Dec 12, 2017

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.

@TheChymera
Copy link
Member

So basically this is a guide to using python3's PIP on CentOS 5.*?
Certainly helpful info! But we generally recommend just downloading the packages manually and installing via setuptools. It may take a bit longer, but it will prevent you from running into issues such as the ones above.

Additionally, I am unsure whether your network issues stem from CentOS. Can you please check your version? At the AIC we have CentOS release 5.11 and CentOS release 5.10 - you can check with:

cat /etc/issue

Also, could you please formulate a short test for us to diagnose whether we have the same issue as you at the AIC? Then we can determine (a) whether this is indeed a CentOS issue (b) which versions it affects.

@felixsc1
Copy link
Member Author

We have CentOS 5.10 too. I asked in the CentOS support chat, its intentional. The openssl (or whatever is needed to connect to https sites) is no longer updated and therefore not accepted by the rest of the internet, too many security holes.

I tried to manually install the missing modules, but then they required other packages, so you have to first install those, it was never ending, eventually I ran into a package that wouldn't install for some reason. Pip just handles and downloads all dependencies automatically.

@TheChymera
Copy link
Member

strange, but we never bumped into this at the AIC - and the GitHub download is over HTTPS...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants