I am getting the following error after installing Catboost. ImportError: Module use of python36.dll conflicts with this version of Python - catboost

I installed from wheel and there were no issues in installation. But while importing into my program I am getting errors.

Check that you run your .py script (where import catboost) with right python version

Related

Cannot connect to a mysql:// instance with SQLAlchemy from my Mac

I'm trying to connect to a mySQL database through SQLAlchemy and I can't get it to work for the life of me. Here's the code I'm running and the error I'm getting.
import pandas as pd
import sqlalchemy as sql
import urllib.parse
user = 'user'
pswd = urllib.parse.quote_plus('password')
connect_string = 'mysql://{}:{}#localhost:8018/test'.format(user, pswd)
sql_engine = sql.create_engine(connect_string)
>>> ModuleNotFoundError: No module named 'MySQLdb'
After seeing this, I've tried numerous different ways of installing 'MySQLdb' ( including the obvious 'pip3 install mysqlclient') and when I run that in my terminal, I get the following.
>>> ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I know this question has been posted here before but I've spent 2 hours now trying to figure this out with the advice on those other questions and nothing is working. Can anyone help? Below is a picture of the full error I'm getting when I try and install "mysqlclient"
According to
https://pypi.org/project/mysqlclient/#files
mysqlclient only offers pre-compiled wheel files for Windows machines running 64-bit Python 3.6, 3.7, and 3.8. All other configurations require that it be installed from source, and that can be ... complicated.
You may want to try installing PyMySQL instead, and use a connection URI of the form
mysql+pymysql://<username>:<password>#<host>/<dbname>[?<options>]
SQLAlchemy is a high-level ORM. To connect to backends it needs Python DB API driver(s). You can install SQLAlchemy with a MySQL driver using
pip install -U 'SQLAlchemy[mysql]'
See the list of extra drivers available for such installation.
Most drivers have parts written in C/C++ and thus require compilation. You need to install MySQL-related libraries to compile mysqlclient. See https://stackoverflow.com/search?q=%5Bpip%5D+install+%5Bmysql%5D+%22mysql_config%22+not+found
There are a few pure-Python drivers. They're easier to install. PyMySQL is one such driver. To install it along with SQLAlchemy:
pip install -U 'SQLAlchemy[pymysql]'

How to install HTML package for python3.7

I want to install HTML package for python3.7 but It's is giving error while installing
I tried command pip install html but getting errors in console
ModuleNotFoundError: No module named 'html.parser'; 'html' is not a package
Command "python setup.py egg_info" failed with error code 1 in C:\Users\username\AppData\Local\Temp\pip-install-apo0cgnw\html\
I am getting the same error: archlinux running a virtualenv. I'm looking around it appears to be a problem with a file in there called 'six.py'. Not sure what the problem is but it appears the project has been orphaned because it was consistently updated until 2011. (Also not sure what all of this code is doing in there, similar libraries like 'vapory' are much smaller. - less bloat, less stuff to go wrong) I would suggest either trying it on Python2.x (since it appears that's where it was developed), contacting the developer, or using a different package.
1) download the .tar.gz file OR .zip file according to your OS from this
link .
2) After downloading , install that downloaded package by the following code : pip install ./downloads/SomeProject-1.0.4.tar.gz
And then again follow the below step
You can import the html package as shown below. pip install is not required, as html comes with the Standard library, post Python v3.x,
>>> from html import HTML
>>> h = HTML()
>>> h.p('Hello, world!')
>>> print h # or print(h) in python 3+
<p>Hello, world!</p>
See the html 1.16 project description for more detail .

Error in importing MySQL connector in Python 3.5

I am getting ImportError: No module named 'mysql' while I do the following...
>>> import mysql.connector
MySQL is installed and am on Python 3.5. I can't figure out. The above command is running fine in Python 2.7.
Unfortunately there is no mysql-connector available for python3.5.
So, you can use pymysql module which is a replacement for mysql-connector package
pip install pymysql
import pymysql
Connection = pymysql.connect(host='hostname', user='username', password='password',
db='database',charset='utf8mb4',cursorclass=pymysql.cursors.DictCursor )
ExecuteQuery(Connection)
Connection.close()
For me (OS X 10.11.4, Python 3.5.1), the mysql-connector-package installed itself (by default) into Python 2.7 that was also on my system. I copied the mysql package directory from:
/Library/Python/2.7/site-packages/mysql to /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mysql. Everything works. According to http://dev.mysql.com/doc/connector-python/en/connector-python-versions.html the connector package supports Python 3.3+.
Your specific installation path for the module may be different, but you can easily check this from the REPL using the sys.path:
https://leemendelowitz.github.io/blog/how-does-python-find-packages.html
As we need to be connecting MySQl with Python, the Python command assumes that the connector is enabled. So we need to follow the steps below:
open MySQL Installer;
go to "Custom settings";
go to "Connectors";
choose the connector\Python and version based on the one you are using;
add it;
use import mysql.connector.
It should run, in my case it did!
From Can't run MySql Utilities:
MYSQL Utilities assumes that the MySQL Connector for Python has been installed. If you install it (http://dev.mysql.com/downloads/connector/python/), MySQL Utilities should run OK.
I think this link may help you to solve your problem.

installation error of mysql for django 1.8

i'm trying to install mysql using pip and this error appears.
I'm new to python
the cmd says
"fatal error C1083: Cannot open include file: 'config-win.h: no such file or directory
error: command 'C:\\programfiles(x86)\\microsoft visual studio 10.0\\vc\\bin\\c1.exe'
failed to exit status 2"
if it is already solved i am sorry because i don't understand the presented solutions such as site.cfg that they say don't work anymore (i don't even understand it) my problem is also similar to this
I'm using python 3.4.3 and django 1.8.2
mysql-python is currently not supported by python 3
You have to install mysqlclient and PyMysql

ImportError: No module named 'MySQLdb' - django + mysql

This question concerns: django 1.5.1 with python 3.3 and mysql 5.6.12
Wanting to get Mysql running with Django. Had everything configured, even Database exists with user-pemissions. Got some error when trying syncdb:
ImportError: No module named 'MySQLdb'
There is obviously the Mysql-Lib for python missing. Downloaded the master-edition from petehunt/PyMySQL. Tried "python setup.py install" . Says:
ImportError: No module named 'constants'
Downloaded another version. A tarball from here. Run "python setup.py install". Seems to work, tried to run the syncdb command "python manage.py syncdb". Still:
ImportError: No module named 'MySQLdb'
Any suggestions what to do now? Thanks in advance.
mysqlclient is the recommended mysql driver for python 3
You can install it via pip:
pip install mysqlclient
Well I solve it. Downgraded to 2.7.x , so that i could use this. Seems to me there should exist a big red warning for using django with python 3.x and Windows 7.