When I try installing mysql-python adaptor with pip3 I get this error message:
$ pip3 install mysql-python
Collecting mysql-python
Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/vx/gzl69zd16lg9s4_xsgpnldv00000gn/T/pip-build-qkxwtgtw/mysql-python/setup.py", line 13, in <module>
from setup_posix import get_config
File "/private/var/folders/vx/gzl69zd16lg9s4_xsgpnldv00000gn/T/pip-build-qkxwtgtw/mysql-python/setup_posix.py", line 2, in <module>
from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
/private/var/folders/vx/gzl69zd16lg9s4_xsgpnldv00000gn/T/pip-build-
qkxwtgtw/mysql-python/
It says it in the error message:
ModuleNotFoundError: No module named 'ConfigParser'
Python 3 ImportError: No module named 'ConfigParser'
ModuleNotFoundError: No module named 'ConfigParser' tells us, that you need ConfigParser to be installed first.
MySQL-python-1.2.5 seems pretty old. Not sure if it supports Python 3. Maybe try https://pypi.python.org/pypi/mysqlclient ?
If you're on Windows, sometimes it helps to download and install from the .whl
Related
So I'm on Linux running a small Python script that I've built and it was working perfectly fine.
Some people changed some things in the Linux and I believe the Pandas library was somehow uninstalled.
When I tried to to to the command
pip install pandas,
it showed me this error, which I cannot solve. Can anyone help?
Collecting pandas
Using cached https://files.pythonhosted.org/packages/99/f0/f99700ef327e51d291efdf4a6de29e685c4d198cbf8531541fc84d169e0e/pandas-1.3.5.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-7597g6xb/pandas/setup.py", line 571, in <module>
include.append(numpy.get_include())
AttributeError: module 'numpy' has no attribute 'get_include'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-7597g6xb/pandas/
I am new in python on flask, when i try to install mysql-python by entering the
following command in terminal
pip3 install mysql-python
it shows the following error:
Collecting mysql-python
Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-4nev4id4/mysql-python/setup.py", line 13, in <module>
from setup_posix import get_config
File "/tmp/pip-install-4nev4id4/mysql-python/setup_posix.py", line 2, in <module>
from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-4nev4id4/mysql-python/
and then I use this command
sudo apt install default-libmysqlclient-dev in terminal which has been suggested by many i checked on stackoverflow.
and then I retry to install mysql-python but also it is showing the same error, can anyone please help me.
mysql-python only supports Python 2.x, while you seem to be using Python 3. From the linked PyPI page:
MySQL-3.23 through 5.5 and Python-2.4 through 2.7 are currently
supported. Python-3.0 will be supported in a future release.
To connect to MySQL from Python 3 you can use other alternatives:
mysqlclient
mysql-connector-python
pymysql
cymysql
MySQL-python does not support python3. That is why you get this particular error
ModuleNotFoundError: No module named 'ConfigParser'
In python3 ConfigParser is renamed configparser
One option to connect to MySQL DB is official python connector
Another option is pyodbc
Other options are provided in other answers
I cloned the project from this site and tried to run it. https://github.com/sudhof/politeness/tree/python3
However after creating a virtual environment, when I run "pip install -r requirements", it shows
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Nasif\AppData\Local\Temp\pip-build-1o281esq\scipy\setup.py", line 165, in <module>
setup_package()
File "C:\Users\Nasif\AppData\Local\Temp\pip-build-1o281esq\scipy\setup.py", line 145, in setup_package
from numpy.distutils.core import setup
ModuleNotFoundError: No module named 'numpy'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Nasif\AppData\Local\Temp\pip-build-1o281esq\scipy\
I have tried many solutions from the internet, but nothing seems to help. Any idea?
my python version 3.6.2
pip version 9.0.1
I also tried to install the requirements directly through pipenv, and shows the same result.
Python Version : 3.4.0
Pip Version : 9.0.1
Windows 10
I'm trying to install models from pip and getting the following error.
pip install models
Collecting models
Using cached models-0.9.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\KANIKA~1\AppData\Local\Temp\pip-build-p46tenn_\models\setup.py", line 25, in <module>
import models
File "C:\Users\KANIKA~1\AppData\Local\Temp\pip-build-p46tenn_\models\models\__init__.py", line 23, in <module>
from base import *
ImportError: No module named 'base'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\KANIKA~1\AppData\Local\Temp\pip-build-p46tenn_\models\
Please help me solve this error.
According to the documentation here -
"Since 21 Feb 2010 this package is named “PyModels”. It was renamed due to name clashes between the library and local module with concrete models. It is natural to name the latter “models.py” (e.g. in Django), so it would obviously conflict with an external library named “models”."
So may be you can try with - pip install pymodels, if this is what you are looking for.
I'm trying to install fuel and blocks with
pip install git+git://github.com/mila-udem/blocks.git#v0.0.1
pip install git+git://github.com/mila-udem/fuel.git#v0.0.1
(I was using the root account)
Then I encountered the problem
pip install git+git://github.com/mila-udem/fuel.git#v0.0.1
Downloading/unpacking git+git://github.com/mila-udem/fuel.git#v0.0.1
Cloning git://github.com/mila-udem/fuel.git to /tmp/pip-PnqUs3-build
Running setup.py (path:/tmp/pip-PnqUs3-build/setup.py) egg_info for package from git+git://github.com/mila-udem/fuel.git
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "build/bdist.linux-x86_64/egg/setuptools/__init__.py", line 11, in <module>
File "build/bdist.linux-x86_64/egg/setuptools/extern/__init__.py", line 1, in <module>
ImportError: No module named extern
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 3, in <module>
File "build/bdist.linux-x86_64/egg/setuptools/__init__.py", line 11, in <module>
File "build/bdist.linux-x86_64/egg/setuptools/extern/__init__.py", line 1, in <module>
ImportError: No module named extern
----------------------------------------
Cleaning up...
I have tried to reinstall/update setuptools and still can't get it work. Thanks.
download: https://pypi.python.org/pypi/extern/0.1.0
install: tar zxf extern-0.1.0.tar.gz && python setup.py install
I had the same issue on CentOS7 and got it resolved by doing:
pip install -U extern
You can cross check in your active python version, if you can import the module extern. If that works, then rebuild your easy_install from the downloaded ez_setup.py. e.g. /opt/bin/python ez_setup.py
This will include the extern module into the easy_install routine and the error doesn't show up anymore.
Running then /opt/bin/easy_install <your.egg> should do the job. Note: if you have more than one python version, use fully qualified names or softlinks you created in /usr/bin/