I have Python2.7 & Python3.8 installed on my computer with pipenv. I managed to create a 2.7 project by running the following command:
pipenv --two install
pipenv shell
> python --version
> > Python 2.7.15
But when I tried to install a new dependancy using pipenv I got an TLS error due to SNIMissingWarning:
pip install pylint
...
[pipenv.exceptions.InstallError]: ['Collecting astroid==1.6.6 (from -r C:\\Users\\aymeric\\AppData\\Local\\Temp\\pipenv-pktqf1dv-requirements\\pipenv-66rq3_4k-requirement.txt (line 1))', " Could not fetch URL https://pypi.org/simple/astroid/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/astroid/ (Caused by SSLError(SSLError(1, '_ssl.c:499: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)) - skipping"]
[pipenv.exceptions.InstallError]: ["DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020.
Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support", 'c:\\users\\aymeric\\.virtualenvs\\firmware-pjqfwcnq\\lib\\site-packages\\ pip\\_vendor\\urllib3\\util\\ssl_.py:365: SNIMissingWarning: An HTTPS request has been made, but the SNI (Server Name Indication) extension to TLS is not available on this platform.
This may cause the server to present an incorrect TLS certificate, which can cause validation failures.
You can upgrade to a newer version of Python to solve this.
For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings', ' SNIMissingWarning', 'c:\\users\\aymeric\\.virtualenvs\\firmware-pjqfwcnq\\lib\\site-packages\\pip\\_vendor\\urllib3\\util\\ssl_.py:149: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail.
Which is odd because SNIMissingWarning should have been patch in 2.7.9 as explained in this link
If remote repositories are now unreachable from 2.7 virtualenv how can you do?
Kinds regards
Related
SO when i try to install pip i get this error message any help
i am using python 2.7 because the course uses dependencies from python 2 so ya i cant use python 3 any help is greatly appreciated
python get-pip.py
this is the command i typed
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
f:\temp\temp\tmpbwi9va\pip.zip\pip\_vendor\urllib3\util\ssl_.py:424: SNIMissingWarning: An HTTPS request has been made, but the SNI (Server Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
f:\temp\temp\tmpbwi9va\pip.zip\pip_vendor\urllib3\util\ssl_.py:164: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
ERROR: Could not find a version that satisfies the requirement pip<21.0 (from versions: none)
ERROR: No matching distribution found for pip<21.0
I am having trouble installing codalab (https://codalab.org/) using python2.7.x. The codalab site has provided a tutorial here through which one can install their CLI to interact with their server.
The tutorial says that we need to have python 2.7 and to install codalab simply run the command "pip install codalab -U --user" whereas here it says, run "pip install codalab" but none of the commands work and i get the error from both of the commands.
The error trace is as follows
https://pip.pypa.io/en/latest/development/relea
se-process/#python-2-support
Collecting codalab
c:\python27\lib\site-packages\pip\_vendor\urllib3\util\ssl_.py:365: SNIMissingWarning: An HTTPS request has been made, but the SNI (Server Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures.<br />
You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings SNIMissingWarning
c:\python27\lib\site-packages\pip\_vendor\urllib3\util\ssl_.py:149: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail.You can upgrade to a newer version of Python to solve this. For more information, seehttps://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecurePlatformWarning <br />
Using cached https://files.pythonhosted.org/packages/78/c9/596147d4836372f07c2
463cc8ad79eba3c6b18f3a9ab50b57fbac94ea3f2/codalab-0.3.2.tar.gz
Collecting codalabworker>=0.3.2 (from codalab)
Using cached https://files.pythonhosted.org/packages/8e/16/7bdc06efeab5d712a55
7a0fed8d1e050dbf4769d96afac295f620e2b44a2/codalabworker-0.3.2.tar.gz <br />
ERROR: Command errored out with exit status 1:
command: 'c:\python27\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\hafiza~1\\appdata\\local\\temp\\pip-install-rbchpi\\codalabworker\\setup.py'"'"';__file__='"'"'c:\\users\\hafiza~1\\appdata\\local\\temp\\pip-installrbchpi\\codalabworker\\setup.py'"'"';f=getattr(tokenize, '"'"'
open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))'egg_info --egg-base pip-egg-info <br />
cwd: c:\users\hafiza~1\appdata\local\temp\pip-install-rbchpi\codalabworker\ <br />
Complete output (1 lines):<br />
**error in codalabworker setup command: "values of 'package_data' dict" must be a list of strings (got 'requirements.txt')** <br />
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.<br />
I have tried different versions of python from 2.7.0 to2.7.8 and the 2.7.16 but I get the same error. I have also tried the 3.7.0.
OS: windows 8.1
Python --version tried : mentioned above
pip version tried: latest 19 for both 2.7 and 3.0
every python tool was upgraded.
Other links tried: could not found none related to this problem
You may need to fix the codalabworker/setup.py file.
Check this: https://github.com/codalab/codalab-worksheets/commit/6e92da072e17ad7a25c287325d0795233fd2d168
Or change package_data={'': 'requirements.txt'} to
package_data={'': ['requirements.txt'\].
I have a local device farm that is running python 2.7.13 via Appium 1.6.5 on some android emulators. We want to increase our exposure and make use of the AWS device farm. The problem is that AWS only support Python 2.7.6 and they don't have plans to upgrade.
We need at least Python 2.7.9+ because any python below that doesn't support SSL with the "request" package.
We tried "request[security] == 2.9.1" but it introduces a dependency in the wheel packages that AWS doesn't support.
With python 2.7.6 on Windows and AWS we get the following errors when downloading packages with pip...
...
Collecting cryptography>=2.2.1 (from
pyOpenSSL>=0.13->requests[security]==2.9.1->-r
/tmp/scratchzAHCQI.scratch/test-packagep3mb8i/requirements.txt (line
5))
/tmp/scratchzAHCQI.scratch/tmpZjjNAE/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:90:
InsecurePlatformWarning: A true SSLContext object is not available.
This prevents urllib3 from configuring SSL appropriately and may cause
certain SSL connections to fail. For more information, see
https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning Downloading
https://files.pythonhosted.org/packages/22/21/233e38f74188db94e8451ef6385754a98f3cad9b59bedf3a8e8b14988be4/cryptography-2.3.1.tar.gz
(449kB)
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 20, in
File "/tmp/pip-build-nqoNP_/cryptography/setup.py", line 28, in
"cryptography requires setuptools 18.5 or newer, please upgrade to a "
RuntimeError: cryptography requires setuptools 18.5 or newer, please upgrade to a newer version of setuptools
---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in
/tmp/pip-build-nqoNP_/cryptography
/tmp/scratchzAHCQI.scratch/tmpZjjNAE/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:90:
InsecurePlatformWarning: A true SSLContext object is not available.
This prevents urllib3 from configuring SSL appropriately and may cause
certain SSL connections to fail. For more information, see
https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
/tmp/scratchzAHCQI.scratch/tmpZjjNAE/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:90:
InsecurePlatformWarning: A true SSLContext object is not available.
This prevents urllib3 from configuring SSL appropriately and may cause
certain SSL connections to fail. For more information, see
https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning You are using pip version 7.1.2, however
version 18.0 is available. You should consider upgrading via the 'pip
install --upgrade pip' command.
An AWS support engineer mentioned that we can setup our own environment to support a new version of Python. However, the documentation is very confusing as it doesn't specify what the "Tech Spec" file should be called (I assume buildspec.yml), where I should put it, whether we should still use wheel or just pip?
Can I use apt or should I use yum?
I've looked around the internet but can't really find anything related to python and the AWS tech spec. All I want to do is install Python 2.7.9, install the requirements and trigger the tests and be able to make post to https REST services.
Have anyone had to solve this issue before?
You can choose just from default 2.7.6 vs optional 3.4.3. Follow this post to setup python 3 environment: https://forums.aws.amazon.com/message.jspa?messageID=865585#868262
I have developed a Django 1.8 application using Python 3.3. I am trying to deploy the application on a university dedicated server with Red Hat Enterprise Linux Server release 7.2 (Maipo). (Note: RHEL does not let me install newer versions of Django and Python)
I had difficulty with installing mod_wsgi using the RHEL Apache and I ended up installing:
pip install -U mod_wsgi-httpd
pip install mod_wsgi
Everything works perfectly when I use the following setup:
python manage.py runmodwsgi --setup-only --port=80 --user=iman --group=root --server-root=/etc/mod_wsgi-express-80
However, when I want to setup HTTPS, using the following setup does not return any error message, but the website does not show up neither with http:// nor with https:// prefixes.
python manage.py runmodwsgi --setup-only --port=80 --user=iman --group=root --server-root=/etc/mod_wsgi-express-80 --https-only --https-port=443 --ssl-certificate-file=/etc/sslcert/iman.crt --ssl-certificate-key-file=/etc/sslcert/private/iman.key --ssl-ca-certificate-file=/etc/sslcert/certs/ca-bundle.crt --server-name=iman123.university.edu
Here are helpful resources that I found about mod_wsgi:
mod_wsgi docs
GitHub repository
Running HTTPS and client authentication with mod_wsgi-express
pip install mod_wsgi-express left out mod_ssl.so
Thank you so much for your time and concern and apologies in advance if I am doing something wrong.
When i am trying to install Graphlab Create, it's just retrying connections. I have healthy broadband wifi connection at my home (NO proxy).
Error: (graphlab)ankit#ankit21:~$ pip install graphlab-create==0.9.1
Collecting graphlab-create==0.9.1
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd6a16ae850>, 'Connection to 192.168.16.253 timed out. (connect timeout=15)')': /simple/graphlab-create/
The proxy 192.168.16.253 is proxy of my college internet. But i have changed the setting in networks setting to automatic proxy. Others installs in terminal are working properly only this is having the problem.
You need your specific academic license key, but trying to install the older version automatically updates your install to 1.7.1. If you choose to copy your code from the installation instructions and you remove --upgrade, and change to 0.9.1 it will still not work.
pip install --no-cache-dir https://get.dato.com/GraphLab-Create/0.9.1/your_key/GraphLab-Create-License.tar.gz
You can obtain your key for the latest version when you register with GraphLab on the Dato website. The academic license is free for each user for one year.
On the official site (https://turi.com/download/install-graphlab-create.html?email=**YOU**%40gmail.com&key=**7C68-...-D3D7**) we have:
Registered email address: YOUR_ADDRESS
Product key: YOUR_PRODUCT_KEY
Installing with dependencies:
Install Anaconda
bash /path to download file/Anaconda2-4.0.0-Linux-x86_64.sh
Create conda environment
conda create -n gl-env python=2.7 anaconda=4.0.0
source activate gl-env
Ensure pip version >= 7
conda update pip
Install GraphLab Create
pip install --upgrade --no-cache-dir https://get.graphlab.com/GraphLab-Create/2.1/YOUR_ADDRESS/YOUR_PRODUCT_KEY/GraphLab-Create-License.tar.gz
Ensure installation of IPython and IPython Notebook
conda install ipython-notebook