Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pymssql module not found
#5
pymssql is on pip list.

When I check if pymssql is installed its good, but when I try to run web server I get error:

im@raspberrypi:~/Desktop/Studiju darbs/Majas_Lapa $ python
Python 3.9.2 (default, Mar 12 2021, 04:06:34)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymssql
>>>
[2]+ Stopped python
im@raspberrypi:~/Desktop/Studiju darbs/Majas_Lapa $ sudo python main.py
Traceback (most recent call last):
File "/home/im/Desktop/Studiju darbs/Majas_Lapa/main.py", line 1, in <module>
from website import create_app
File "/home/im/Desktop/Studiju darbs/Majas_Lapa/website/__init__.py", line 2, in <module>
import pymssql
ModuleNotFoundError: No module named 'pymssql'



Here will be my main.py:

from website import create_app

app = create_app()

if __name__ == '__main__':
app.run(host="0.0.0.0",port=80,debug=True)

Here will be my __init__.py:

from flask import Flask
import pymssql

def create_app():
app = Flask(__name__)
app.config['SECRET_KEY'] = 'QSJSNDFSDKFSKDFSD SKSDLdsfsdf'

from.views import views
from.auth import auth

app.register_blueprint(views, url_prfix='/')
app.register_blueprint(auth, url_prfix='/')

return app



I tried instead of pymssql use pyodbc, sqlalchemy and flask_sqlalchemy and get the same error when try to run web server on Raspberry pi
Reply


Messages In This Thread
pymssql module not found - by shifts - Jun-01-2022, 08:18 PM
RE: pymssql module not found - by Larz60+ - Jun-01-2022, 10:32 PM
RE: pymssql module not found - by shifts - Jun-02-2022, 05:04 PM
RE: pymssql module not found - by Larz60+ - Jun-02-2022, 05:27 PM
RE: pymssql module not found - by shifts - Jun-02-2022, 08:16 PM
RE: pymssql module not found - by Larz60+ - Jun-02-2022, 08:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Module not found tjnichols 3 3,525 May-12-2018, 03:07 PM
Last Post: tjnichols

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020