Python 101 – may be 100.01 :)

 

While investigating a problem related to Python programs with open transactions I end up experimenting with Python today!

It took a few hours to install Python, required libraries, execute first program and complete my actual investigation related to pyodbc library!

If you would like to experiment, here is the best documentation to start with:

https://code.visualstudio.com/docs/python/python-tutorial#_prerequisites

 

Note:

If you have SSL certificate problems during installation, workaround is to dd these url as trusted site

Could not fetch URL https://pypi.org/simple/pyodbc/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=’pypi.org’, port=443): Max retries exceeded with url: /simple/pyodbc/ (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)’))) – skipping

WARNING: Retrying (Retry(total=1, 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/pyodbc/

Example: python -m pip install –trusted-host pypi.org –trusted-host files.pythonhosted.org  matplotlib

 

Note2: pip3 installs required version for V3 but not pip

 

Note-3: How to install .whl

pip install C:/temp/mylibrary.whl

 

This entry was posted in Powershell, Python, Uncategorized and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s