mysql-connector-python is not supported in python3.2? - python

I've tried installing mysql-connector python using
pip install mysql-connector-python
and
pip install mysql-connector-python --allow-external mysql-connector-python
I get the following error saying python v3.2 is not supported.
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/home/wolfgang/projects/python/python_backend/build/mysql-connector-python/setup.py", line 41, in <module>
import setupinfo
File "setupinfo.py", line 37, in <module>
major=sys.version_info[0], minor=sys.version_info[1]
RuntimeError: Python v3.2 is not supported
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/home/wolfgang/projects/python/python_backend/build/mysql-connector-python/setup.py", line 41, in <module>
import setupinfo
File "setupinfo.py", line 37, in <module>
major=sys.version_info[0], minor=sys.version_info[1]
RuntimeError: Python v3.2 is not supported
----------------------------------------
Should i upgrade my python version? or is there a workaround?

There were some important improvement in 2.x compatibility in Python 3.3, so a lot of packages only support 3.3+. mysql-connector-python is one of them. You are unlikely to be able to fix it without a large amount of work. It would be much easier to just install a later version.

Related

Problems with installing packages with Anaconda

I tried installing pandas_datareader in Anaconda using conda install -c anaconda pandas-datareader. It gives me this result:
Traceback (most recent call last):
File "C:\Users\Peter\Anaconda3\lib\site.py", line 168, in addpackage
exec(line)
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pywin32_bootstrap'
Remainder of file ignored
Error processing line 7 of C:\Users\Peter\Anaconda3\lib\site-packages\pywin32.pth:
Traceback (most recent call last):
File "C:\Users\Peter\Anaconda3\lib\site.py", line 168, in addpackage
exec(line)
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pywin32_bootstrap'
Remainder of file ignored
Okay, bad luck I thought, and I tried installing something else (plotly). And this gave me exactly the same result.
Try:
conda remove [-c anaconda] pywin32
conda install -c anaconda pywin32
Code in brakets is not necessary.
This should reinstall pywin32. And go for another try. It worked for me using pip.

how to fix' no module name: object_objection.box_coders'?

ModuleNotFoundError on object-detection
Error StackTrace
Traceback (most recent call last):
File "train.py", line 58, in <module>
from object_detection.builders import model_builder
File "C:\Program Files\Python37\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\builders\model_builder.py", line 21, in <module>
from object_detection.builders import box_coder_builder
File "C:\Program Files\Python37\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\builders\box_coder_builder.py", line 17, in <module>
from object_detection.box_coders import faster_rcnn_box_coder
ModuleNotFoundError: No module named 'object_detection.box_coders'
Seems your package is broken. Try reinstall it:
pip install --force-reinstall object-detection
Also see the docs's requires:
Requires: Python >=3.5, !=3.7.*
It only works with Python>=3.5 but no Python 3.7.*, so it doesn't work with your current Python. Consider install Python 3.5 and it should e fine.

Trigger (Networktest) installation on Python 3.7

Currently I have the problem that I get the following error message under Python 3.7 when installing the package trigger (network test for router / switch).
If you try to install the offending package separately, then you get the same error message.
Collecting gtextfsm (from trigger)
Using cached https://files.pythonhosted.org/packages/98/12/edfdccf3d968ffbb94ac8e48b3172395b6902eb4265bded0b0d07a1652f3/gtextfsm-0.2.1.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\xxxxxx\AppData\Local\Temp\pip-install-4_suoa4z\gtextfsm\setup.py", line 19, in <module>
import textfsm
File "C:\Users\xxxxxx\AppData\Local\Temp\pip-install-4_suoa4z\gtextfsm\textfsm\__init__.py", line 2, in <module>
__version__ = textfsm.__version__
NameError: name 'textfsm' is not defined-
Is there another alternative to triggers?
Did someone have the problem described above?
Other solutions?

Using Python 3 when Python 2.7 is default, pip install error

I originally had both python 2.7 and python 3 installed with python 2.7 as my default in PATH. I needed to run a script using python 3 but could not set it as my default python in PATH for some reason. After just uninstalling python 2.7 I opened 3 and ran the command python get-pip.py install which gave me this error
C:\Python30>python get-pip.py install
Traceback (most recent call last):
File "c:\users\jacob\appdata\local\temp\tmplqxvtx\pip.zip\pip\compat\__init__.py", line 16, in <module>
ImportError: cannot import name OrderedDict
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "get-pip.py", line 19177, in <module>
main()
File "get-pip.py", line 194, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 82, in bootstrap
import pip
File "c:\users\jacob\appdata\local\temp\tmplqxvtx\pip.zip\pip\__init__.py", line 14, in <module>
File "c:\users\jacob\appdata\local\temp\tmplqxvtx\pip.zip\pip\utils\__init__.py", line 22, in <module>
File "c:\users\jacob\appdata\local\temp\tmplqxvtx\pip.zip\pip\compat\__init__.py", line 18, in <module>
File "c:\users\jacob\appdata\local\temp\tmplqxvtx\pip.zip\pip\compat\ordereddict.py", line 25, in <module>
ImportError: No module named UserDict
I already tried python -m pip install (module name) but it returns No module named pip
I assume you use windows, so here is an answer how to install pip on windows:
how-do-i-install-pip-on-windows
On Linux you could just type:
sudo apt install python-pip

Not able to install AppiumLibrary with robotframework in jython

I am trying to install AppiumLibrary with robotframework in jython
Steps followed:
jython -m pip install robotframework-appiumLibrary
Error:
Downloading/unpacking sauceclient>=0.1.0 (from robotframework-appiumLibrary)
Downloading sauceclient-0.2.1.tar.gz
Running setup.py (path:C:\Users\ABHISH~1\AppData\Local\Temp\pip_build_abhishek
singh\sauceclient\setup.py) egg_info for package sauceclient
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "C:\Users\ABHISH~1\AppData\Local\Temp\pip_build_abhisheksingh\saucecl
ient\setup.py", line 27, in <module>
from sauceclient import __version__
File "sauceclient.py", line 26, in <module>
is_py2 = sys.version_info.major is 2
AttributeError: 'tuple' object has no attribute 'major'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "C:\Users\ABHISH~1\AppData\Local\Temp\pip_build_abhisheksingh\sauceclient
\setup.py", line 27, in <module>
from sauceclient import __version__
File "sauceclient.py", line 26, in <module>
is_py2 = sys.version_info.major is 2
**AttributeError: 'tuple' object has no attribute 'major'**
Anybody has any idea how to use this libaray?
You need to debug sauceclient-0.2.1.tar.gz. See if you can install it before installing robotframework-appiumLibrary.
To fix the code in "sauceclient.py" edit to:
is_py2 = sys.version_info[0] is 2
Thank you so much ,it did work for me here are the steps I followed:
1.Download sauceclient-0.2.1 and Changed sauceclient.py
is_py2 = sys.version_info[0] is 2
2. Install sauceclient-0.2.1
jython -m setup.py install
3.Run :
jython -m pip install robotframework-appiumLibrary

Categories

Resources