I am trying to run InstaPy bot on my Raspberry Pi with 32bit Kali Linux installed. Everything is up to date, upgraded and libc6 updated as well. My GLIBC version is 2.32-4 and according to kali repo this is the most actual version.
$ ldd --version 1 тип
ldd (Debian GLIBC 2.32-4) 2.32
$ apt-cache policy libc6
libc6:
Installed: 2.32-4
Candidate: 2.32-4
Version table:
*** 2.32-4 500
500 http://http.kali.org/kali kali-rolling/main armhf Packages
100 /var/lib/dpkg/status
However if I run bot i get this:
$ python3 quickstart.py
Traceback (most recent call last):
File "/home/kali/Downloads/instapy-quickstart-master/quickstart.py", line 2, in <module>
from instapy import InstaPy
File "/home/kali/.local/lib/python3.10/site-packages/instapy/__init__.py", line 6, in <module>
from .instapy import InstaPy
File "/home/kali/.local/lib/python3.10/site-packages/instapy/instapy.py", line 33, in <module>
from .clarifai_util import check_image
File "/home/kali/.local/lib/python3.10/site-packages/instapy/clarifai_util.py", line 3, in <module>
from clarifai.rest import ClarifaiApp
File "/home/kali/.local/lib/python3.10/site-packages/clarifai/rest/__init__.py", line 3, in <module>
from clarifai.rest.client import ApiClient
File "/home/kali/.local/lib/python3.10/site-packages/clarifai/rest/client.py", line 36, in <module>
from clarifai.rest.grpc.proto.clarifai.api.endpoint_pb2_grpc import V2Stub
File "/home/kali/.local/lib/python3.10/site-packages/clarifai/rest/grpc/proto/clarifai/api/endpoint_pb2_grpc.py", line 2, in <module>
import grpc
File "/home/kali/.local/lib/python3.10/site-packages/grpc/__init__.py", line 22, in <module>
from grpc import _compression
File "/home/kali/.local/lib/python3.10/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/kali/.local/lib/python3.10/site-packages/grpc/_cython/cygrpc.cpython-310-arm-linux-gnueabihf.so)
I would like to keep Kali I am pretty much used to it. I'd like to point out that I'm not a coder or something just a guy who got his first linux based OS a week ago.
The problem seemed to be incompatible OS. I installed Raspbian and everything went ok.
Related
I set up my development environment on Fedora 35 and when I run any brownie command such as $ brownie console or even brownie --version I get the following error:
Traceback (most recent call last):
File "/home/philippbunke/.local/bin/brownie", line 5, in <module>
from brownie._cli.__main__ import main
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/brownie/__init__.py", line 6, in <module>
from brownie.project import compile_source, run
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/brownie/project/__init__.py", line 3, in <module>
from .main import ( # NOQA 401
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/brownie/project/main.py", line 44, in <module>
from brownie.network import web3
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/brownie/network/__init__.py", line 4, in <module>
from .account import Accounts
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/brownie/network/account.py", line 12, in <module>
import eth_account
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/eth_account/__init__.py", line 1, in <module>
from eth_account.account import ( # noqa: F401
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/eth_account/account.py", line 8, in <module>
from cytoolz import (
File "/home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/cytoolz/__init__.py", line 3, in <module>
from .functoolz import *
ImportError: /home/philippbunke/.local/pipx/venvs/eth-brownie/lib64/python3.10/site-packages/cytoolz/functoolz.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send
Setup:
Python=3.10.1
Cython=0.29.26
gcc/gcc-c=11.2.1-7.fc35.x86_64
Ganache CLI=v6.12.2
$ pipx list
venvs are in /home/philippbunke/.local/pipx/venvs
apps are exposed on your $PATH at /home/philippbunke/.local/bin
package eth-brownie 1.16.4, Python 3.10.1
- brownie
$ $PATH
/home/philippbunke/.local/bin:/home/philippbunke/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/var/lib/snapd/snap/bin
I have spent a whole day trying to fix this error, please help me out!
The problem here seems to be Python 3.10.1!
I used anaconda to create a new virtual environment with Python 3.8.12, installed brownie using pipx install --python python3.8 eth-brownie and it worked!
The trick here was, to also tell pipx to use another python version, otherwise it would create a dependency to the global python version, which is python 3.10 in my case.
I'm trying to upgrade some packages and to consolidate my requirements.txt for an existing python program in order to move it to a docker container.
This container will be based on the tensorflow docker container, this dictates some package versions I have to use. We work under windows and we want to be able to run the program locally on our machines (at least for some time). So I need to find a configuration that works in docker and on Windows 10.
Tensorflow 2.4.1 needs numpy~=1.19.2. When using numpy 1.20, pip complains that numpy 1.20 is an incompatible version.
But when using numpy~=1.19.2 I get the following error when importing cvxpy. pip installs all packages just fine:
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
Traceback (most recent call last):
File "test.py", line 1, in <module>
import cvxpy
File "c:\Projekte\algo5\venv\lib\site-packages\cvxpy\__init__.py", line 18, in <module>
from cvxpy.atoms import *
File "c:\Projekte\algo5\venv\lib\site-packages\cvxpy\atoms\__init__.py", line 20, in <module>
from cvxpy.atoms.geo_mean import geo_mean
File "c:\Projekte\algo5\venv\lib\site-packages\cvxpy\atoms\geo_mean.py", line 20, in <module>
from cvxpy.utilities.power_tools import (fracify, decompose, approx_error, lower_bound,
File "c:\Projekte\algo5\venv\lib\site-packages\cvxpy\utilities\power_tools.py", line 18, in <module>
from cvxpy.atoms.affine.reshape import reshape
File "c:\Projekte\algo5\venv\lib\site-packages\cvxpy\atoms\affine\reshape.py", line 18, in <module>
from cvxpy.atoms.affine.hstack import hstack
File "c:\Projekte\algo5\venv\lib\site-packages\cvxpy\atoms\affine\hstack.py", line 18, in <module>
from cvxpy.atoms.affine.affine_atom import AffAtom
File "c:\Projekte\algo5\venv\lib\site-packages\cvxpy\atoms\affine\affine_atom.py", line 22, in <module>
from cvxpy.cvxcore.python import canonInterface
File "c:\Projekte\algo5\venv\lib\site-packages\cvxpy\cvxcore\python\__init__.py", line 3, in <module>
import _cvxcore
ImportError: numpy.core.multiarray failed to import
Steps to reproduce:
1.)
Create a new Python 3.8 venv under Windows 10 and activate it
2.) Install the following requirements.txt via pip install -r requirements.txt:
cvxpy
numpy~=1.19.2 # tensorflow 2.4.1 requires this version
3.) Execute the following test.py via python test.py
import cvxpy
if __name__ == '__main__':
pass
The same thing happens if I want to use tensorflow 2.3. In this case numpy~=1.18 is needed, the error is exactly the same.
Searching for the error finds very few hits which sadly did not help me.
What can I do to solve this?
My environment specs
python --version
Python 3.7.6
anaconda --version
anaconda Command line client (version 1.7.2)
sw_vers
ProductName: Mac OS X
ProductVersion: 10.15.2
BuildVersion: 19C57
I installed camelot from conda-forge
using the command below.
conda install -c conda-forge camelot-py
Attaching the logs when I try to import camelot for pdf parsing and text extraction purposes.
Traceback (most recent call last):
File "/~/PycharmProjects/Utilities/rosblancos/pdf-utilities/pdf-element-extractor.py", line 1, in <module>
import camelot
File "/~/.conda/envs/Utilities/lib/python3.7/site-packages/camelot/__init__.py", line 6, in <module>
from .io import read_pdf
File "/~/.conda/envs/Utilities/lib/python3.7/site-packages/camelot/io.py", line 5, in <module>
from .handlers import PDFHandler
File "/~/.conda/envs/Utilities/lib/python3.7/site-packages/camelot/handlers.py", line 9, in <module>
from .parsers import Stream, Lattice
File "/~/.conda/envs/Utilities/lib/python3.7/site-packages/camelot/parsers/__init__.py", line 4, in <module>
from .lattice import Lattice
File "/~/.conda/envs/Utilities/lib/python3.7/site-packages/camelot/parsers/lattice.py", line 27, in <module>
from ..image_processing import (
File "/~/.conda/envs/Utilities/lib/python3.7/site-packages/camelot/image_processing.py", line 5, in <module>
import cv2
ImportError: dlopen(/~/.conda/envs/Utilities/lib/python3.7/site-packages/cv2.cpython-37m-darwin.so, 2): Library not loaded: #rpath/libglib-2.0.0.dylib
Referenced from: /~/.conda/envs/Utilities/lib/libharfbuzz.0.dylib
Reason: Incompatible library version: libharfbuzz.0.dylib requires version 5601.0.0 or later, but libglib-2.0.0.dylib provides version 0.0.0
Process finished with exit code 1
I googled the error above and found this issue. However, I am unable to solve this issue as I am not able to find out what I need to do with the file named libglib.
Doing this worked for me:
pip install opencv-python
I'm writing a script which will build the docker image and then push the image to ECR.
my current python version is
>python --version
Python 3.8.0
so, for some reason, at the first line while running my python at local, I'm getting below error. Saying this means, it has not yet build the image to push into the ECR.
import docker --> throws below error
Traceback (most recent call last):
File "genericECR.py", line 1, in <module>
import docker
File "C:\Users\AppData\Local\Programs\Python\Python38-32\lib\site-packages\docker\__init__.py", line 2, in <module>
from .api import APIClient
File "C:\Users\AppData\Local\Programs\Python\Python38-32\lib\site-packages\docker\api\__init__.py", line 2, in <module>
from .client import APIClient
File "C:\Users\AppData\Local\Programs\Python\Python38-32\lib\site-packages\docker\api\client.py", line 8, in <module>
import websocket
File "C:\Users\AppData\Local\Programs\Python\Python38-32\lib\site-packages\websocket\__init__.py", line 23, in <module>
from ._app import WebSocketApp
File "C:\Users\AppData\Local\Programs\Python\Python38-32\lib\site-packages\websocket\_app.py", line 36, in <module>
from ._core import WebSocket, getdefaulttimeout
File "C:\Users\AppData\Local\Programs\Python\Python38-32\lib\site-packages\websocket\_core.py", line 34, in <module>
from ._handshake import *
File "C:\Users\AppData\Local\Programs\Python\Python38-32\lib\site-packages\websocket\_handshake.py", line 40, in <module>
if six.PY34:
AttributeError: module 'six' has no attribute 'PY34'
six is already installed
Requirement already satisfied: six in c:\users\appdata\local\programs\python\python38-32\lib\site-packages (1.6.1)
it seems like it is intended for python 34 so for python 38, how can I solve this?
Most probably the six version is not high enough, c.f. https://github.com/docker/docker-py/issues/2294
First check the six version:
import six
print(six.__version__)
If six version is not >=1.0.0, then upgrade six, on command line
python -m pip install -U six
With the latest pip, you should see this:
>>> import six
>>> six.__version__
'1.13.0'
>>> six.PY34
True
it helped, I was having the issue with docker-compose running, that command helped:
python -m pip install -U six
>>> import theano
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/theano/__init__.py", line 52, in <module>
from theano.gof import (
File "/Library/Python/2.7/site-packages/theano/gof/__init__.py", line 38, in <module>
from theano.gof.cc import \
File "/Library/Python/2.7/site-packages/theano/gof/cc.py", line 30, in <module>
from theano.gof import link
File "/Library/Python/2.7/site-packages/theano/gof/link.py", line 18, in <module>
from theano.gof.type import Type
File "/Library/Python/2.7/site-packages/theano/gof/type.py", line 17, in <module>
from theano.gof.op import CLinkerObject
File "/Library/Python/2.7/site-packages/theano/gof/op.py", line 25, in <module>
from theano.gof.cmodule import GCC_compiler
File "/Library/Python/2.7/site-packages/theano/gof/cmodule.py", line 8, in <module>
import six.moves.cPickle as pickle
ImportError: No module named cPickle
I'm pretty sure there is no problem with cPickle. Can it be the problem of other dependencies? It's true that I upgraded all the packages this morning, so that a conflict of version may occur. Nonetheless, the problem still exists after I switched to the bleeding-edge version of theano. Would someone help me figure it out?
PS: My developing device is Macbook Pro 13(early 2015); my system version is OS X 10.10.5; python version is 2.7.10
=========================== Second Edit ===================================
It seems I do have latest version of six installed on my Mac.
YiqundeMacBook-Pro:~ Leo$ pip show six
---
Metadata-Version: 2.0
Name: six
Version: 1.9.0
Summary: Python 2 and 3 compatibility utilities
Home-page: http://pypi.python.org/pypi/six/
Author: Benjamin Peterson
Author-email: benjamin#python.org
License: MIT
Location: /Library/Python/2.7/site-packages
Requires:
I had the same problem and upgrading six solved issue:
sudo easy_install --upgrade six
Try to avoid using sudo at all costs. Open a python session and run
import six
print six.__version__
print six.__file__
The version will likely not be most recent (1.10.0), so go manually delete the six.py and six.pyc files at the imported path, and then run pip install six. Python should now be importing the latest version of six, compatible with Theano :)