久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <i id='tSDSS'><tr id='tSDSS'><dt id='tSDSS'><q id='tSDSS'><span id='tSDSS'><b id='tSDSS'><form id='tSDSS'><ins id='tSDSS'></ins><ul id='tSDSS'></ul><sub id='tSDSS'></sub></form><legend id='tSDSS'></legend><bdo id='tSDSS'><pre id='tSDSS'><center id='tSDSS'></center></pre></bdo></b><th id='tSDSS'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='tSDSS'><tfoot id='tSDSS'></tfoot><dl id='tSDSS'><fieldset id='tSDSS'></fieldset></dl></div>

      1. <small id='tSDSS'></small><noframes id='tSDSS'>

        <legend id='tSDSS'><style id='tSDSS'><dir id='tSDSS'><q id='tSDSS'></q></dir></style></legend>
      2. <tfoot id='tSDSS'></tfoot>

          <bdo id='tSDSS'></bdo><ul id='tSDSS'></ul>

        M1 Mac 上的 Pyodbc

        Pyodbc on M1 Macs(M1 Mac 上的 Pyodbc)
      3. <legend id='vdZqX'><style id='vdZqX'><dir id='vdZqX'><q id='vdZqX'></q></dir></style></legend>

        <small id='vdZqX'></small><noframes id='vdZqX'>

          <tfoot id='vdZqX'></tfoot>
            <tbody id='vdZqX'></tbody>
            <bdo id='vdZqX'></bdo><ul id='vdZqX'></ul>

          • <i id='vdZqX'><tr id='vdZqX'><dt id='vdZqX'><q id='vdZqX'><span id='vdZqX'><b id='vdZqX'><form id='vdZqX'><ins id='vdZqX'></ins><ul id='vdZqX'></ul><sub id='vdZqX'></sub></form><legend id='vdZqX'></legend><bdo id='vdZqX'><pre id='vdZqX'><center id='vdZqX'></center></pre></bdo></b><th id='vdZqX'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='vdZqX'><tfoot id='vdZqX'></tfoot><dl id='vdZqX'><fieldset id='vdZqX'></fieldset></dl></div>

                1. 本文介紹了M1 Mac 上的 Pyodbc的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在嘗試使用 pyodbc 連接到 Microsoft sql server 數據庫.我不斷收到錯誤

                  I am trying to connect to a Microsoft sql server database using pyodbc. I keep getting the error

                  錯誤: ('01000', "[01000] [unixODBC][Driver Manager]無法打開 lib 'ODBC Driver 17 for SQL Server': 找不到文件 (0) (SQLDriverConnect)")

                  Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 17 for SQL Server' : file not found (0) (SQLDriverConnect)")

                  檢查 pyodbc.drivers() 沒有結果

                  我根據提供的說明安裝了 Microsoft ODBC 驅動程序 這里:

                  I installed the Microsoft ODBC driver according to the instructions provided here:

                  我運行了 odbcinst -j 產生了

                  DRIVERS............: /etc/odbcinst.ini 
                  SYSTEM DATA SOURCES: /etc/odbc.ini 
                  FILE DATA SOURCES..: /etc/ODBCDataSources
                  USER DATA SOURCES..: /Users/pawannandakishore/.odbc.ini
                  SQLULEN Size.......: 8
                  SQLLEN Size........: 8
                  SQLSETPOSIROW Size.: 8
                  


                  但是當我到達 /etc 時,我找不到 odbcinst.iniodbc.ini.他們似乎在 opt/homebrew/Cellar/


                  but when I got to /etc, I cannot find either odbcinst.ini or odbc.ini. They are seem to be in opt/homebrew/Cellar/

                  我真的很感激這方面的幫助.

                  I would really appreciate some help on this.

                  推薦答案

                  UPD:

                  您實際上可以在容器中使用 pyodbc 但容器應該在 x86_64 架構容器中構建和執行.為此,您需要將 platform 添加到 docker-compose.yml 或在容器運行期間(使用 docker 時)提供參數.您需要確保使用 buildx 構建容器!

                  UPD:

                  You actually can use pyodbc in the container but the container should be built and executed in the x86_64 arch container. In order to do this, you need to add the platform either to docker-compose.yml or provide an argument during container run (when using docker). You need to make sure that you are building a container using buildx!

                  碼頭工人:

                  • docker buildx build --platform linux/amd64 -t myimage .
                  • docker run --platform linux/amd64 myimage bash

                  Docker-compose:

                  Docker-compose:

                  version: "3.9"
                  
                  services:
                    web:
                      image: myimage:latest
                      build:
                        context: ./
                      platform: linux/amd64
                  


                  原答案:

                  pyodbc 確實不支持 ARM 架構.我在 M1 上使用 pymssql 以連接到 MSSQL 服務器.


                  Original answer:

                  It's true that pyodbc does not support ARM architecture. I'm using pymssql on my M1 in order to connect to MSSQL server.

                  1. 您需要安裝系統要求freetds-dev.對于 alpine 容器,它將是 apk add freetds-dev

                  1. You need to install the system requirement freetds-dev. For alpine container, it will be apk add freetds-dev

                  在 pip 要求中添加 pymssql 包.

                  In pip requirements add pymssql package.

                  使用簡單腳本測試連接:

                  Test connection with simple script:

                  import pymssql
                  conn = pymssql.connect(server='mssql', user='SA', password='Passw@rd', database='master')
                  cursor = conn.cursor()
                  cursor.execute("""SELECT 1;""")
                  

                  1. SqlAlchemy 連接應該如下所示

                  SQLALCHEMY_DATABASE_URI = (
                      f"mssql+pymssql://{MSSQL_USER}:{MSSQL_PASSWORD}@{MSSQL_HOST}/{MSSQL_DB}?"
                  )
                  

                  如果您需要在 M1 上運行 MSSQL 數據庫 - 這是我對這個問題的回答 https://stackoverflow.com/a/66919852/11515610

                  If you need to run MSSQL database on M1 - here my answer on this problem https://stackoverflow.com/a/66919852/11515610

                  相關鏈接:

                  • 自適應服務器連接失敗(DB-Lib 錯誤消息 20002,嚴重性 9)

                  https://docs.sqlalchemy.org/en/14/dialects/mssql.html#module-sqlalchemy.dialects.mssql.pymssql

                  https://docs.microsoft.com/en-us/sql/connect/python/pymssql/step-1-configure-development-environment-for-pymssql-python-development?view=sql-server-ver15

                  https://pymssql.readthedocs.io/en/stable/pymssql_examples.html

                  這篇關于M1 Mac 上的 Pyodbc的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Break down a table to pivot in columns (SQL,PYSPARK)(分解表以按列進行透視(SQL、PYSPARK))
                  Spark giving Null Pointer Exception while performing jdbc save(Spark在執行jdbc保存時給出空指針異常)
                  execute query on sqlserver using spark sql(使用 spark sql 在 sqlserver 上執行查詢)
                  How can I compare the one line in one CSV with all lines in another CSV file?(如何將一個 CSV 中的一行與另一個 CSV 文件中的所有行進行比較?)
                  How to map the column wise data in flowfile in NiFi?(如何在 NiFi 中映射流文件中的列數據?)
                  connect SQL to apache nifi(將 SQL 連接到 apache nifi)

                        • <bdo id='GMckt'></bdo><ul id='GMckt'></ul>
                        • <small id='GMckt'></small><noframes id='GMckt'>

                          • <legend id='GMckt'><style id='GMckt'><dir id='GMckt'><q id='GMckt'></q></dir></style></legend>
                          • <tfoot id='GMckt'></tfoot>

                              <tbody id='GMckt'></tbody>
                            <i id='GMckt'><tr id='GMckt'><dt id='GMckt'><q id='GMckt'><span id='GMckt'><b id='GMckt'><form id='GMckt'><ins id='GMckt'></ins><ul id='GMckt'></ul><sub id='GMckt'></sub></form><legend id='GMckt'></legend><bdo id='GMckt'><pre id='GMckt'><center id='GMckt'></center></pre></bdo></b><th id='GMckt'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='GMckt'><tfoot id='GMckt'></tfoot><dl id='GMckt'><fieldset id='GMckt'></fieldset></dl></div>
                          • 主站蜘蛛池模板: 国产视频久久久久 | 日韩精品专区在线影院重磅 | 91偷拍精品一区二区三区 | 美女黄18岁以下禁止观看 | 91免费在线| 久久久一区二区三区四区 | 日韩三级在线观看 | 国产99久久精品 | 亚洲一视频| 国产成人高清视频 | 精品中文字幕一区二区三区 | 黄a免费网络 | 日韩高清一区二区 | 中文字幕一级 | 日韩www视频| 中文字幕国产精品 | 国产精品免费观看 | 日日爱av | 欧美日韩国产三级 | 久久久久欧美 | 精品国产乱码久久久久久1区2区 | 国产一区二区三区久久久久久久久 | 久久亚洲一区二区三区四区 | 欧美成人高清 | 亚洲免费在线观看 | 国产精品夜夜春夜夜爽久久电影 | 国产精品一区一区 | 精品国产一区二区三区观看不卡 | 91毛片在线观看 | 另类一区| 日韩有码一区 | 日韩精品一区在线 | 三级免费av | 午夜精品久久久久久久久久久久久 | 国产剧情一区 | 亚洲欧美日韩高清 | 欧美综合一区二区 | 久久精品av麻豆的观看方式 | 国产精品亚洲欧美日韩一区在线 | 麻豆久久| 国产在线高清 |