my-voice-analysis myspsolution module not found error - python-3.x

we are using python library my-voice-analysis but getting myspsolution import error please tell what is the solution
import myspsolution as mysp
p="Audio" # Audio File title
c=r"speech.wav"
mysp.myspgend(p,c)
Traceback (most recent call last):
File "C:\Users\ADITYA\AppData\Local\Programs\Python\Python36\sp.py", line 1, in <module>
import myspsolution as mysp
ModuleNotFoundError: No module named 'myspsolution'

i know its a bit late and you probs dont need it anymore but
replace
import myspsolution as mysp
with
mysp=__import__("my-voice-analysis")

Related

ImportError: cannot import name 'cpyHook' from partially initialized module 'pyWinhook'

This has been plaguing me for a while now, and I'm not sure what to do about it. I've tried modifying the init.py pyWinhook script's imports, but to no avail. Here's the whole error:
Traceback (most recent call last):
File "d:\myuser\Documents\Python\evil_programs\keylogger.py", line 6, in <module>
import pyWinhook as pyHook
File "C:\Users\myuser\AppData\Roaming\Python\Python310\site-packages\pyWinhook\__init__.py", line 1, in <module>
from .HookManager import *
File "C:\Users\myuser\AppData\Roaming\Python\Python310\site-packages\pyWinhook\HookManager.py", line 1, in <module>
from . import cpyHook
ImportError: cannot import name 'cpyHook' from partially initialized module 'pyWinhook' (most likely due to a circular import) (C:\Users\myuser\AppData\Roaming\Python\Python310\site-packages\pyWinhook\__init__.py)
Thanks in advance
The way I fixed this is by installing Python 3.8.
Python 3.10 and 3.11 produced this issue.
I got this idea from the executable name on GitHub "pyWinhook-1.6.2.win-amd64-py3.8.exe"
Why it does not work with newer python, I have no clue.

I am trying to use the help function in python but getting an error

help(time.sleep)
Traceback (most recent call last): File "", line 1, in
NameError: name 'time' is not defined
At the beginning of the program you have to import all the modules you need. To do this you need to use the import keyword followed by the package name.
import time
help(time.sleep)

Python cv2 throws strange symbol error when importing

typically I can find the solution to any errors I have online, but I just cannot find the solution to this particular problem anywhere.
So I've installed OpenCV4 on my ubuntu 20.04 using pip3, but upon typing the following commands:
$ python3
import cv2
I get this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jordan/.local/lib/python3.7/site-packages/cv2/__init__.py", line 5, in <module>
from .cv2 import *
ImportError: /usr/lib/x86_64-linux-gnu/librsvg-2.so.2: undefined symbol: cairo_tag_end
I am not entirely sure what the error means. My guess is that it's something to do with the environment variables, but I don't know how to fix that anyways. I really hope someone can help me fix this.

Running Python in Windows

Am new to python, i installed python 3.2 in my windows and tried the following code,
import urllib, urllister
usock = urllib.urlopen("http://diveintopython.net/")
parser = urllister.URLLister()
parser.feed(usock.read())
usock.close()
parser.close()
for url in parser.urls: print(url)
Its showing,
Traceback (most recent call last):
File "demo.py", line 1, in <module>
import urllib, urllister
ImportError: No module named urllister
How to add that module?
urllister is not part of the standard library.
You must download file urllister.py from here, and save it next to the script you're running.

import tkinter yields error

Starting the Open Book on Python 3.1
import turtle #this yields an error from importing tkinter
Script:
import tkinter
exit()
Yields:
Traceback (most recent call last):
File "imptk.py", line 1, in <module>
import tkinter
File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/tkinter/__init__.py", line 39, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/lib-dynload/_tkinter.so, 2): no suitable image found. Did find:
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/lib-dynload/_tkinter.so: mach-o, but wrong architecture
Any suggestions?
Your Python is incorrectly installed, the library in question has been compiled for the wrong architecture, maybe the wrong processor or for 32 bit when it should have been 64, or similar. In any case this is not a programming error.

Resources