When I tried to run mysqldbcopy utility I get the following error.
mysqldbcopy --source=root:root#localhost:3306 \
--destination=root:root#localhost:3306 first:first_copy
Traceback (most recent call last):
File "/usr/bin/mysqldbcopy", line 24, in <module>
from mysql.utilities.common.tools import check_python_version
ImportError: No module named mysql.utilities.common.tools
I have checked that python (2.6) is installed on my machine.
I have installed mysql python connector mentioned at http://dev.mysql.com/downloads/connector/python/
I have installed mysql utilities from
https://dev.mysql.com/downloads/utilities/
I am not sure why I am still getting that error.
Related
I am trying to run a Julia script from python. I have Julia 1.6.4 installed (also tried 1.7.3) and installed pip install julia from Pycharm's terminal in the virtual environment. When importing julia and then running julia.install() I get the following error message:
I use Pycharm with a virtual environment with Python 3.9.7 for my project. However, I have also tried different python versions in different virtual environments or by using the base python installed. All give the same error.
Also, ~/.julia/packages/PyCall/*/deps/build.log does not exist for me.
[ Info: Trying to import PyCall...
Fatal Python error: init_import_size: Failed to import the site module
Python runtime state: initialized
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\site.py", line 73, in <module>
import os
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\os.py", line 29, in <module>
from _collections_abc import _check_methods
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\_collections_abc.py", line 12, in <module>
GenericAlias = type(list[int])
TypeError: 'type' object is not subscriptable
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:\Users\<user>\PycharmProjects\<project>\venv\lib\site-packages\julia\tools.py", line 118, in install
raise PyCallInstallError("Installing", output)
julia.tools.PyCallInstallError: Installing PyCall failed.
** Important information from Julia may be printed before Python's Traceback **
Some useful information may also be stored in the build log file
`~/.julia/packages/PyCall/*/deps/build.log`.```
Julia needs to have PyCall installed
PyCall in Julia needs to be configured to use the same Python that you are using to call Julia from
For more information see this post:
I have a high-performant function written in Julia, how can I use it from Python?
I've gotten my hands on a AIY voice kit v1 and am stuck with the assistant_grpc_demo.py with it failing at an import statement with the grpc. I should have everything installed already, yet google.auth.transport can't seem to find it. I am using a pi 3 A+. Below is the terminal commands I used and their outputs.
pi#raspberrypi:~ $ cat testinput.py
import google.auth.transport.grpc
pi#raspberrypi:~ $ python3 testinput.py
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.7/site-packages/google/auth/transport/grpc.py", line 30, in <module>
import grpc
File "/home/pi/.local/lib/python3.7/site-packages/grpc/__init__.py", line 22, in <module>
from grpc import _compression
File "/home/pi/.local/lib/python3.7/site-packages/grpc/_compression.py", line 15, in <module>
from grpc._cython import cygrpc
ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' not found (required by /home/pi/.local/lib/python3.7/site-packages/grpc/_cython/cygrpc.cpython-37m-arm-linux-gnueabihf.so)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "testinput.py", line 1, in <module>
import google.auth.transport.grpc
File "/home/pi/.local/lib/python3.7/site-packages/google/auth/transport/grpc.py", line 37, in <module>
caught_exc,
File "<string>", line 3, in raise_from
ImportError: gRPC is not installed, please install the grpcio package to use the gRPC transport.
*Maybe the glibc part is the problem. Not sure how to resolve that as I already have libc6 2.28. Is there a way to get the aiy-python-wheels to work with my set-up or a previous version. Already tried flashing a pre-built official image built on 4-13-2018 with everything set up, though it failed to boot. Trying to download all packages manually. assistant_library_with_button.sh works though.
Not sure how to resolve that as I already have libc6 2.28
The error message says: .../site-packages/grpc/_cython/cygrpc.cpython-37m-arm-linux-gnueabihf.so requires GLIBC_2.33.
Your libc6 is too old for that gRPC package to work -- it was compiled on a newer system.
You must either:
get a different gRPC package -- one compiled on and suitable for running on a GLIBC-2.28 (or earlier) based system, or
get a different GLIBC package (2.33 or later).
Recently, I have installed Cassandra. 3.6
After installation, I got an error.
Connection error: ('Unable to connect to any servers', {'127.0.0.1': TypeError('ref() does not take keyword arguments',)})
To solve this, I have followed
pip install cassandra-driver==2.7.2
pip install cassandra-driver
export CQLSH_NO_BUNDLED=true
And my python version is 2.7
right Now, when I run cqlsh, I'm getting following error
Traceback (most recent call last):
File "/usr/bin/cqlsh.py", line 167, in <module>
from cqlshlib import cql3handling, cqlhandling, pylexotron, sslhandling
File "/usr/lib/python2.7/dist-packages/cqlshlib/cql3handling.py", line 17, in <module>
from .cqlhandling import CqlParsingRuleSet, Hint
File "/usr/lib/python2.7/dist-packages/cqlshlib/cqlhandling.py", line 21, in <module>
from cassandra.metadata import cql_keywords_reserved
ImportError: cannot import name cql_keywords_reserved
How can I solve this error? How can I run cassandra withour errors?
You are seeing CASSANDRA-11840, which occurs with older versions of the driver with Python 2.7.12+.
To work around it, either
1.) Upgrade to Cassandra 3.8+, which bundles a driver version that does not have this problem.
or
2.) Make your environment/PATH use Python <= 2.7.11
or
3.) CQLSH_NO_BUNDLED=1 as you guessed, but install a version of the driver that has the fix (cassandra-driver >= 3.4.0).
When I try and run MySQL Utilities from WorkBench I get the following error:
h3tr1ck$ mysqluc -e "help utilities"
Traceback (most recent call last):
File "/bin/mysqluc", line 23, in <module>
from mysql.utilities.common.options import license_callback, UtilitiesParser
File "/Library/Python/2.7/site-packages/mysql/utilities/common/options.py", line 34, in <module>
from mysql.connector.conversion import MySQLConverter
ImportError: No module named connector.conversion
Then, if I type "mysql" into terminal it tells me that the command can not be found. Any help would be appreciated.
Thanks.
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.
Im trying to use a lib on bsd that was designed for linux for IBM-db connections:
I have installed as per the ibmdocs for linux, and placed the required linux libs in /compat/linux/lib/
But i get the import error:
>>> import ibm_db
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: Shared object "libdb2.so.1" not found, required by "ibm_db.so"
If I place the file manually in /usr/lib or symlink it I get a read error:
>>> import ibm_db
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: /usr/lib/libdb2.so.1: Undefined symbol "strcspn"
If anyone could help on this I would be forever grateful!!
I have installed ibm_db and both ibm_db_sa without failure, I just think its more of an issue trying to use the linux app on bsd.
Since it's looking for libraries in /usr/lib, you seem to be running the FreeBSD version of Python.
Since FreeBSD's Linux compatibility is a per process compatibility, you cannot load Linux libraries into a FreeBSD process. If you want to dynamically load Linux libraries, you need to run a Linux version of Python.