Could not install packages due to an EnvironmentError: Missing dependencies for SOCKS support
$ pip install keras Collecting keras Could not install packages due to an EnvironmentError: Missing dependencies for SOCKS support.
Solution:
This is due to using the proxy on ubuntu, the proxy software might have changed some environmental variables. check those variables using:
$ env | grep -i proxy NO_PROXY=localhost,127.0.0.0/8,::1 ALL_PROXY=socks://127.0.0.1:1080/ socks_proxy=socks://127.0.0.1:1080/ no_proxy=localhost,127.0.0.0/8,::1
unset all other variables other than NO_PROXY and no_proxy, by using:
$ unset ALL_PROXY $ unset socks_proxy
* variable names are case-sensitive
check the variables again
$ env | grep -i proxy NO_PROXY=localhost,127.0.0.0/8,::1 no_proxy=localhost,127.0.0.0/8,::1
now do whatever you were doing, it will not give proxy error.
$ pip install keras Collecting keras Downloading https://files.pythonhosted.org/packages/06/ea/ad52366ce566f7b54d36834f98868f743ea81a416b3665459a9728287728/Keras-2.2.3-py2.py3-none-any.whl (312kB) 100% |████████████████████████████████| 317kB 453kB/s Requirement already satisfied: keras-applications>=1.0.6 in /home/azam/.virtualenvs/keras_py/lib/python3.5/site-packages (from keras) (1.0.6) Collecting pyyaml (from keras) Downloading https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz (270kB) 100% |████████████████████████████████| 276kB 476kB/s Requirement already satisfied: h5py in /home/azam/.virtualenvs/keras_py/lib/python3.5/site-packages (from keras) (2.8.0) Requirement already satisfied: keras-preprocessing>=1.0.5 in /home/azam/.virtualenvs/keras_py/lib/python3.5/site-packages (from keras) (1.0.5) Requirement already satisfied: numpy>=1.9.1 in /home/azam/.virtualenvs/keras_py/lib/python3.5/site-packages (from keras) (1.15.2) Requirement already satisfied: six>=1.9.0 in /home/azam/.virtualenvs/keras_py/lib/python3.5/site-packages (from keras) (1.11.0) Requirement already satisfied: scipy>=0.14 in /home/azam/.virtualenvs/keras_py/lib/python3.5/site-packages (from keras) (1.1.0) Building wheels for collected packages: pyyaml Running setup.py bdist_wheel for pyyaml ... done Stored in directory: /home/azam/.cache/pip/wheels/ad/da/0c/74eb680767247273e2cf2723482cb9c924fe70af57c334513f Successfully built pyyaml Installing collected packages: pyyaml, keras Successfully installed keras-2.2.3 pyyaml-3.13
Related Links:
- UnboundLocalError: local variable ‘name’ referenced before assignment
- [UBUNTU 16.04] Tensorflow-gpu 1.11 with Compute capability 3.0 (with cuda 9 and cudnn 7.3)