![]() ![]() ![]() The command line with prepend with a parenthesis around the environment name. To activate the environment use the following command from inside your project folder. This will create as hidden folder call “.venv”. I usually create a project folder and run this command inside so it is unique to each project. Use the following command to create a new environment for your project. sudo apt-get install unixodbc unixodbc-dev These drivers may be required for Mac as well. In the case of Ubuntu I had to install the Unix ODBC drivers using the following apt- get command (db tales com). I am working with linux for this example. ![]() The environment may be different depending on your platform Linux, Windows or Mac. With a new environment you will need to install the module before importing it. I tested this code using P圜harm and a new virtual environment that did not have pyodbc. This example is to access a sql database using python and linux. You will need to install the driver first and then use the “import” command to bring it into your project. To connect to SQL Server we will need the PyODBC to provide the drivers for Microsoft SQL Server. For the Python experienced Developers & DBA’s I thought I would include an article about connecting to SQL server similar to the SQL server powershell version we wrote recently. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |