I got the error After I installed ryu on my ubuntu - python

I'm trying to install Ryu controller on Ubuntu which I installed on my laptop. I don't understand where my mistake lies
Traceback (most recent call last):
File "/home/jeo/.local/bin/ryu-manager", line 5, in <module>
from ryu.cmd.manager import main
File "/home/jeo/.local/lib/python3.10/site-packages/ryu/cmd/manager.py", line 22, in <module>
from ryu.lib import hub
File "/home/jeo/.local/lib/python3.10/site-packages/ryu/lib/hub.py", line 30, in <module>
import eventlet
File "/home/jeo/.local/lib/python3.10/site-packages/eventlet/__init__.py", line 17, in <module>
from eventlet import convenience
File "/home/jeo/.local/lib/python3.10/site-packages/eventlet/convenience.py", line 7, in <module>
from eventlet.green import socket
File "/home/jeo/.local/lib/python3.10/site-packages/eventlet/green/socket.py", line 4, in <module>
__import__('eventlet.green._socket_nodns')
File "/home/jeo/.local/lib/python3.10/site-packages/eventlet/green/_socket_nodns.py", line 11, in <module>
from eventlet import greenio
File "/home/jeo/.local/lib/python3.10/site-packages/eventlet/greenio/__init__.py", line 3, in <module>
from eventlet.greenio.base import * # noqa
File "/home/jeo/.local/lib/python3.10/site-packages/eventlet/greenio/base.py", line 32, in <module>
socket_timeout = eventlet.timeout.wrap_is_timeout(socket.timeout)
File "/home/jeo/.local/lib/python3.10/site-packages/eventlet/timeout.py", line 166, in wrap_is_timeout
base.is_timeout = property(lambda _: True)
TypeError: cannot set 'is_timeout' attribute of immutable type 'TimeoutError'

This could be due to the python version installed in your system. Try downgrading to a lower version between 2.7 and 3.7 if you are using one of the newer ones.

Related

Installing google's cloud text to speech python module on a raspberry pi

Reproduce on a raspberry pi (I have a v4 B) running Raspbian GNU/Linux 10 (buster) in a terminal window by running:
pip3.x install google-cloud-texttospeech
python3.x
from google.cloud import texttospeech
I'm getting this error message regarding an incorrect version of GLIBC for cygrpc:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/pi/miniconda3/envs/assistant-env/lib/python3.6/site-packages/google/cloud/texttospeech/__init__.py", line 17, in <module>
from google.cloud.texttospeech_v1.services.text_to_speech.client import (
File "/home/pi/miniconda3/envs/assistant-env/lib/python3.6/site-packages/google/cloud/texttospeech_v1/__init__.py", line 17, in <module>
from .services.text_to_speech import TextToSpeechClient
File "/home/pi/miniconda3/envs/assistant-env/lib/python3.6/site-packages/google/cloud/texttospeech_v1/services/text_to_speech/__init__.py", line 16, in <module>
from .client import TextToSpeechClient
File "/home/pi/miniconda3/envs/assistant-env/lib/python3.6/site-packages/google/cloud/texttospeech_v1/services/text_to_speech/client.py", line 24, in <module>
from google.api_core import gapic_v1
File "/home/pi/miniconda3/envs/assistant-env/lib/python3.6/site-packages/google/api_core/gapic_v1/__init__.py", line 16, in <module>
from google.api_core.gapic_v1 import config
File "/home/pi/miniconda3/envs/assistant-env/lib/python3.6/site-packages/google/api_core/gapic_v1/config.py", line 23, in <module>
import grpc
File "/home/pi/miniconda3/envs/assistant-env/lib/python3.6/site-packages/grpc/__init__.py", line 22, in <module>
from grpc import _compression
File "/home/pi/miniconda3/envs/assistant-env/lib/python3.6/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/miniconda3/envs/assistant-env/lib/python3.6/site-packages/grpc/_cython/cygrpc.cpython-36m-arm-linux-gnueabihf.so)
does anyone know of a functional configuration on raspbian 10 for this python module wrapping google text to speech api? Thanks in advance!
P.S. see this issue thread for some context https://github.com/timgrossmann/InstaPy/issues/6357
Never mind! This link is broken. See this link instead:
https://github.com/InstaPy/InstaPy/issues/6357

python TypeError: 'type' object is not iterable error

I am getting an error message when I try to run a python script, the python script I am attempting to run is https://raw.githubusercontent.com/orangetw/awesome-jenkins-rce-2019/master/exp.py I don't think that this is an issue with the script as I am able to run this on my host OS (having run the script in as OS)
Traceback (most recent call last):
File "exp.py", line 7, in <module>
import requests
File "/usr/local/lib/python2.7/dist-packages/requests/__init__.py", line 84, in <module>
from urllib3.contrib import pyopenssl
File "/usr/local/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py", line 46, in <module>
import OpenSSL.SSL
File "/home/kali/.local/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import crypto, SSL
File "/home/kali/.local/lib/python2.7/site-packages/OpenSSL/crypto.py", line 12, in <module>
from cryptography import x509
File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/__init__.py", line 8, in <module>
from cryptography.x509.base import (
File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/base.py", line 18, in <module>
from cryptography.x509.extensions import Extension, ExtensionType
File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/extensions.py", line 26, in <module>
from cryptography.x509.general_name import GeneralName, IPAddress, OtherName
File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/general_name.py", line 16, in <module>
from cryptography.x509.name import Name
File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/name.py", line 28, in <module>
_ASN1_TYPE_TO_ENUM = {i.value: i for i in _ASN1Type}
TypeError: 'type' object is not iterable
line 7 is
import requests
Help appreciated

Cannot run python script in command line - urllib3.util.ssl_

When I run a python script in Pycharm it works perfectly. When I try to run it via the command line it errors:
C:\Users\Administrator\anaconda3\python.exe "C:\Users\Administrator\Desktop\Scripts\KD.py"
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\Scripts\Kariba_Dwell.py", line 10, in <module>
import s3fs
File "C:\Users\Administrator\anaconda3\lib\site-packages\s3fs\__init__.py", line 1, in <module>
from .core import S3FileSystem, S3File
File "C:\Users\Administrator\anaconda3\lib\site-packages\s3fs\core.py", line 15, in <module>
import botocore.session
File "C:\Users\Administrator\anaconda3\lib\site-packages\botocore\session.py", line 30, in <module>
import botocore.credentials
File "C:\Users\Administrator\anaconda3\lib\site-packages\botocore\credentials.py", line 42, in <module>
from botocore.utils import InstanceMetadataFetcher, parse_key_val_file
File "C:\Users\Administrator\anaconda3\lib\site-packages\botocore\utils.py", line 31, in <module>
import botocore.httpsession
File "C:\Users\Administrator\anaconda3\lib\site-packages\botocore\httpsession.py", line 7, in <module>
from urllib3.util.ssl_ import (
ImportError: cannot import name 'ssl' from 'urllib3.util.ssl_' (C:\Users\Administrator\anaconda3\lib\site-packages\urllib3\util\ssl_.py)
You need to activate your environment in the command-line.
For instance: Assume your environment name is conda_torch
conda activate conda_torch then an activated environment will be available.
Then you should type: python KD.py

In centos - No module named lazy_object_proxy while executing prospector library for python

After installing prospector by using pip install prospector, I execute this command.
prospector --version
I got this error
Traceback (most recent call last):
File "/home/ec2-user/ingestion/acadenv/bin/prospector", line 7, in <module>
from prospector.run import main
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/prospector/run.py", line 8, in <module>
from prospector import blender, postfilter, tools
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/prospector/tools/__init__.py", line 7, in <module>
from prospector.tools.pylint import PylintTool
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/prospector/tools/pylint/__init__.py", line 6, in <module>
from pylint.config import find_pylintrc
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/pylint/config.py", line 48, in <module>
from pylint import utils
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/pylint/utils.py", line 39, in <module>
from astroid import nodes, Module
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/astroid/__init__.py", line 54, in <module>
from astroid.nodes import *
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/astroid/nodes.py", line 39, in <module>
from astroid.node_classes import (
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/astroid/node_classes.py", line 24, in <module>
import lazy_object_proxy
ImportError: No module named lazy_object_proxy
Moreover I have executed pip install lazy_object_proxy but this does not solve the problem also.

Ssh Python Module Gives Error When Trying To Import

I've been trying to figure out how to ssh using python 2.7 on a 64-bit Windows 8 computer. I found a module called ssh, so I used pip to install it. But when I type,
>>> import ssh
It gives me this error,
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import ssh
File "C:\Python27\lib\site-packages\ssh\__init__.py", line 62, in <module>
from transport import SecurityOptions, Transport
File "C:\Python27\lib\site-packages\ssh\transport.py", line 33, in <module>
from ssh import util
File "C:\Python27\lib\site-packages\ssh\util.py", line 33, in <module>
from ssh.common import *
File "C:\Python27\lib\site-packages\ssh\common.py", line 98, in <module>
from Crypto import Random
File "c:\users\sethco~1\appdata\local\temp\easy_install-u7gyec\pycrypto-2.6-py2.7-win-amd64.egg.tmp\Crypto\Random\__init__.py", line 28, in <module>
File "c:\users\sethco~1\appdata\local\temp\easy_install-u7gyec\pycrypto-2.6-py2.7-win-amd64.egg.tmp\Crypto\Random\OSRNG\__init__.py", line 34, in <module>
File "c:\users\sethco~1\appdata\local\temp\easy_install-u7gyec\pycrypto-2.6-py2.7-win-amd64.egg.tmp\Crypto\Random\OSRNG\nt.py", line 28, in <module>
File "c:\users\sethco~1\appdata\local\temp\easy_install-u7gyec\pycrypto-2.6-py2.7-win-amd64.egg.tmp\Crypto\Random\OSRNG\winrandom.py", line 7, in <module>
File "c:\users\sethco~1\appdata\local\temp\easy_install-u7gyec\pycrypto-2.6-py2.7-win-amd64.egg.tmp\Crypto\Random\OSRNG\winrandom.py", line 6, in __bootstrap__
ImportError: DLL load failed: %1 is not a valid Win32 application.
I'm not sure what it means. Did I install it correctly? How do I fix this? Are there any alternatives? I would appreciate your help very much.

Categories

Resources