Install Keras on company computer (behind firewalls)

  • Thread starter Thread starter Aber
  • Start date Start date
Joined
8/7/15
Messages
91
Points
18
Hi guys. Is there a way I can install Keras and Sciann (Python) packages on my company computer behind the firewalls?
I tried something like this:

But it won't work. Will anyone please help?
 
You want to look into how to install packages with a proxy server, which will help you directly connect to the internet. Most companies use one, so you will have to figure out what the proxy server url is and pip install with the appropriate flags. If you use an ide like Pycharm, you can look up how to input https proxy server info and directly install from the ide if you do not know how to do it from the command line.
 
Why not ask your IT department??
I did but Python is not a part of the company solutions availabe to us so thay can't help. Weird I know. Me and my colleagues runs Anaconda/Spyder locally on out computer which have simply downloaed - for somehow it worked behind the company firewalls. But isntalling packages seems to be a problem
 
I can relate to your struggle and would be glad to offer some advice. Since I do not have insight into your background with environment management in python, I'll add some basic details - apologies for some things that might appear obvious.

Fluxy is completely right - you need to get these proxy servers. When I first started in a company that had similar restrictions (and zero IT support for programming), I had to reach out to other python/R programmers to get the proxy servers. Make sure to get both http and https if both are available. Perhaps IT team can help you with this too, but it might take you forever to find the right person in IT department.

Once you obtain proxy servers:
We default to managing environments through conda - and since you already have this installed, try this:
1) Start Anaconda Prompt
2) type in command prompt (replacing "smth" with your proxy servers)
set HTTP_PROXY=http:/smth
set HTTPS_PROXY=https:/smth
3) conda install packageyouneed

If this doesn't work, try specifying the channel from which you want to install the package.

Long-term solution:
If you do have .condarc file already (typically saved in your %userprofile%), just add proxy servers there. You can add that through command prompt or manually. If you do not have .condarc file setup, I highly recommend that you look into creating this file to permanenly set proxy server/channel priorities, etc. Check these instructions out: Using Anaconda behind a company proxy — Anaconda documentation

Last resort option (not recommended!):
You can download the package manually. Conditional your company doesn't restrict downloads and you have access to Github. (Typically you can submit the request through supervisor/IT department to give you permission to view and download from Github if you're a developer).

But beware if you download it into your base (or your most frequently used) environment - there might be package conflicts. Also, you will run into trouble when trying to detect this package in your conda environment (through conda list command).
Perhaps try downloading this zip file and unpacking it into another location on your machine rather than to your conda or python environment and then try importing this package as a module by appending the path via sys. This way you do not touch your base python env and there is less risk you'll have to de-install and re-install everything anew.

Every organization is different, so please take this advice with a grain of salt. Corrections from other users are welcomed! I went a bit too detailed here, but hope it helps you or someone else in the future.
 
Back
Top Bottom