Install library from downloaded pip files - tensorflow

I want to download and install some specific library (it does not have to be tensorflow, but i ll use it as an example)
I have a ubuntu virtual_machine_1 with internet connection.
I do:
pip download tensorflow
After downloading all the files in current folder, I transfer them into virtual machine_2
There I unpack files into folder_with_tf_dependencies and do:
pip install --user --find-links=../folder_with_tf_dependencies
The error I get is:
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7ff735bbe090>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/tensorflow/

Related

Buildozer error while compiling apk - pip ssl

I am trying to compile a simple program into an apk for Android with Buildozer but have run into the following problem. Can you please help? I tried upgrading pip but that didn't help:python3 -m pip install --upgrade pip
So, I reverted back to the original pip version.
Installed Cython separately: pip3 install Cython
But the same issue persists. I am at a loss. :-(
Command: buildozer android debug
RAN: /bin/bash -c 'venv/bin/pip install Cython'
STDOUT:
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
How can I fix this?
Could not fetch URL https://pypi.org/simple/cython/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/cython/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement Cython (from versions: none)
ERROR: No matching distribution found for Cython
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
This is a recent bug, you need to install libssl-dev using apt install libssl-dev
Then you might also want to clean your buildozer directory by running rm -rf .buildozer in the directory that contains your buildozer.spec file.
That should do it!

certificate verify failed using pip install, main problem, (_ssl.c:1108)

I've been trying to install python packages using:
pip install <package>
and all I get is:
"WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED]
certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)'))': /simple/pip/"
I know the code that can fix the problem, for which is (seldomly works):
pip3 install --trusted-host=pypi.org --trusted-host=files.pythonhosted.org --user <package>
but I want to know what is happening behind the scene, what's the core problem and how can I use pip like always!
I'd be tremendously happy if you could help me out.
first write this
pip.ini
and now try to install packages
still if you are getting error then type this
pip install certifi
then write this
pip install Scrapy

How to fix matplotlib installation errors

I do not know how to fix this, any help is appreciated. Thanks in advance
-J
I have tried various ways of installing and importing matplotlib (though command prompt, the text editor I've been using (geany). and neither option has worked. I've also installed the .whl file from https://matplotlib.org/ and it still has not worked (gives the same error)
I originally used the code:
import matplotlib.pyplot as plt
in my text editor (geany) to install matplotlib but this gave the error shown below
Expected Results:
I expect it to import and install the right version of matplotlib (I think the right version for me is matplotlib 3.0 because I'm using python 3.7).
Actual Results:
When I type 'python -m pip install -U matplotlib' into my command prompt (I'm on windows 10, using python 3.7) it displays:
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/matplotlib/
and repeats the message for a total of 5 times then displays:
Could not fetch URL https://pypi.org/simple/matplotlib/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/matplotlib/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))) - skipping
and finishes with the error:
ERROR: Could not find a version that satisfies the requirement matplotlib (from versions: none)
ERROR: No matching distribution found for matplotlib
I have tried to fix this SSLError but I haven't made any progress in this simply because I don't know where to start.
Thanks again for any help
From this topic:
You should add the pypi host to the list of trusted host. To do so, enter those commands:
pip install --trusted-host pypi.python.org pytest-xdist
pip install --trusted-host pypi.python.org --upgrade pip
This could happen if you're behind a firewall and console is blocked from internet. You can download the package to local and run
python -m pip --install -e /path/to/package/folder
or download the wheel file and run
python -m pip install /path/to/wheel_file.whl
A huge thank you to #Louis 'LYRO' Dupont and #Quang Hoang for helping me work through this. What I ended up doing was going to pypi.python.org and downloading all of the requirements as .whl files in order to run matplotlib. This took a bit of work as I had to try to install matplotlib after installing each requirement to see what the next one I needed was. Thanks again to both you guys and have a nice week!

pip is unable to install selenium package

I am getting the below error while trying to install selenium package for Python.
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionRefused Error(10061, 'No connection could be made because the target machine actively refused it', None, 10061, None))': /simple/selenium/
The command I am using is pip.exe install selenium.
I am now able to resolve the proxy/protocol issue by using below command
python.exe -m pip install selenium --proxy="proxy:port"
But with Python 3.5.1 I am still unable to install selenium package and now the error is:
Could not find a version that satisfies the requirement selenium (from versions: ) No matching distribution found for selenium

Cannot install rbenv via homebrew (SSL Handshake)

Just re-installed Yosemite and I cannot install rbenv via homebrew
~ brew install rbenv ruby-build
==> Downloading https://github.com/sstephenson/rbenv/archive/v0.4.0.tar.gz
######################################################################## 100.0%
curl: (35) Server aborted the SSL handshake
Error: Failed to download resource "rbenv"
Download failed: https://github.com/sstephenson/rbenv/archive/v0.4.0.tar.gz
Thoughts?