I have kubernetes pod with image: debian:9.4. I do:
apt -y install python3.6
apt -y install python3-pip
pip3 install pymssql
But when I run script
import pymssql
connection = pymssql.connect(server='', DATABASE='', user='', password='')
I get
Collecting pymssql
Downloading https://files.pythonhosted.org/packages/1e/68/ecb6fdOee024a9ed8a852e7993ba0d059039a9cbc03a515bc1c8b92f8014/pymssg1-2.2.1.tar.gz 170kB)
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "irtmp/pip-build-hhjppxzp/pymssql/setup.py", line 54
raise Exception(f"Unsupported environment value {env_name}={val}")
SyntaxError: invalid syntax
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-hhjppxzp/pymssql/
Traceback (most recent call last):
File "db.py", line 1, in <module>
import pymssql
ImportError: No module named 'pymssql'
I have tried install pymssql directly (without pip)
apt -y install python3-pymysql
but end is the same
Traceback (most recent call last):
File "db.py", line 1, in <module>
import pymssql
ImportError: No module named 'pymssql'
How to fix this problem?