python setup.py egg_info did not run successfully. WARNING: Ignoring invalid distribution -yaudio - warnings

I need some help please... I tried to instal pydictionary and it give me the same errors and warnings. And for anything else the Warning is the same and I can not understand why. I went to that directory to see what is in there but is empty.
C:\WINDOWS\system32>pip install PyDictionary
WARNING: Ignoring invalid distribution -yaudio (c:\users\robi\appdata\local\programs\python\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -yaudio (c:\users\robi\appdata\local\programs\python\python310\lib\site-packages)
Collecting PyDictionary
Using cached PyDictionary-2.0.1-py3-none-any.whl (6.1 kB)
Collecting goslate
Using cached goslate-1.5.4.tar.gz (14 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: requests in c:\users\robi\appdata\local\programs\python\python310\lib\site-packages (from PyDictionary) (2.27.1)
Requirement already satisfied: click in c:\users\robi\appdata\local\programs\python\python310\lib\site-packages (from PyDictionary) (8.1.3)
Collecting bs4
Using cached bs4-0.0.1.tar.gz (1.1 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: beautifulsoup4 in c:\users\robi\appdata\local\programs\python\python310\lib\site-packages (from bs4->PyDictionary) (4.11.1)
Requirement already satisfied: colorama in c:\users\robi\appdata\local\programs\python\python310\lib\site-packages (from click->PyDictionary) (0.4.4)
Collecting futures
Using cached futures-3.0.5.tar.gz (25 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [27 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 14, in <module>
File "C:\Users\Robi\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\__init__.py", line 247, in <module>
monkey.patch_all()
File "C:\Users\Robi\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\monkey.py", line 97, in patch_all
patch_for_msvc_specialized_compiler()
File "C:\Users\Robi\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\monkey.py", line 157, in patch_for_msvc_specialized_compiler
patch_func(*msvc14('_get_vc_env'))
File "C:\Users\Robi\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\monkey.py", line 147, in patch_params
mod = import_module(mod_name)
File "C:\Users\Robi\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\Robi\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 20, in <module>
import unittest.mock as mock
File "C:\Users\Robi\AppData\Local\Programs\Python\Python310\lib\unittest\mock.py", line 26, in <module>
import asyncio
File "C:\Users\Robi\AppData\Local\Programs\Python\Python310\lib\asyncio\__init__.py", line 8, in <module>
from .base_events import *
File "C:\Users\Robi\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 18, in <module>
import concurrent.futures
File "C:\Users\Robi\AppData\Local\Temp\pip-install-jx1giu6v\futures_b2c696095539418c98c7048813756f80\concurrent\futures\__init__.py", line 8, in <module>
from concurrent.futures._base import (FIRST_COMPLETED,
File "C:\Users\Robi\AppData\Local\Temp\pip-install-jx1giu6v\futures_b2c696095539418c98c7048813756f80\concurrent\futures\_base.py", line 357
raise type(self._exception), self._exception, self._traceback
^
SyntaxError: invalid syntax
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
WARNING: Ignoring invalid distribution -yaudio (c:\users\robi\appdata\local\programs\python\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -yaudio (c:\users\robi\appdata\local\programs\python\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -yaudio (c:\users\robi\appdata\local\programs\python\python310\lib\site-packages)
I also tried to see my list and upgrade the setup tools but...
C:\WINDOWS\system32>pip list
WARNING: Ignoring invalid distribution -yaudio (c:\users\robi\appdata\local\programs\python\python310\lib\site-packages)
Package Version
beautifulsoup4 4.11.1
cachetools 5.1.0
calculator1 1.0.0
certifi 2021.10.8
cffi 1.15.0
charset-normalizer 2.0.12
click 8.1.3
colorama 0.4.4
comtypes 1.1.11
DateTime 4.4
distlib 0.3.4
ez-setup 0.9
filelock 3.7.0
Flask 2.1.2
future 0.18.2
google-api-core 2.8.0
google-api-python-client 2.48.0
google-auth 2.6.6
google-auth-httplib2 0.1.0
google-auth-oauthlib 0.5.1
googleapis-common-protos 1.56.1
gTTS 2.2.4
httplib2 0.20.4
idna 3.3
iso8601 1.0.2
itsdangerous 2.1.2
Jinja2 3.1.2
keyboard 0.13.5
MarkupSafe 2.1.1
MouseInfo 0.1.3
numpy 1.23.4
oauthlib 3.2.0
Pillow 9.1.1
pip 22.3.1
platformdirs 2.5.2
playsound 1.3.0
protobuf 3.20.1
pyAlarm 1.0.1
pyasn1 0.4.8
pyasn1-modules 0.2.8
PyAudio 0.2.12
PyAutoGUI 0.9.53
pycparser 2.21
PyGetWindow 0.0.9
pyjokes 0.6.0
PyMsgBox 1.0.9
pyparsing 3.0.9
pyperclip 1.8.2
pypiwin32 223
PyRect 0.2.0
PyScreeze 0.1.28
pyserial 3.5
pyttsx3 2.90
pytweening 1.0.4
pytz 2022.1
pywhatkit 5.3
pywin32 304
PyYAML 6.0
requests 2.27.1
requests-oauthlib 1.3.1
rsa 4.8
scipy 1.9.3
serial 0.0.97
setuptools 65.5.1
six 1.16.0
sounddevice 0.4.4
soupsieve 2.3.2.post1
SpeechRecognition 3.8.1
uritemplate 4.1.1
urllib3 1.26.9
virtualenv 20.14.1
Werkzeug 2.1.2
wheel 0.38.4
wikipedia 1.4.0
xgboost 1.7.1
zope.interface 5.4.0
WARNING: Ignoring invalid distribution -yaudio (c:\users\robi\appdata\local\programs\python\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -yaudio (c:\users\robi\appdata\local\programs\python\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -yaudio (c:\users\robi\appdata\local\programs\python\python310\lib\site-packages)
I tried to upgrade pip and tools in cmd but that warning is still there. I uninstall the pyaudio to see if that is the problem but still the same errors. I hope someone can help me with this problem please
I appreciate your help

Related

Trying this -->"converting YOLO V5 Ultralytics model and config format into Darknet format" # I get this error

AttributeError Traceback (most recent call last)
in ()
4 with open(cfg_file_name, 'w') as cfg:
5 with open(yaml_file_name,'r') as f:
----> 6 f = yaml.load(f,Loader=yaml.FullLoader)
7 net = 0
8 for l in f:
AttributeError: module 'yaml' has no attribute 'FullLoader'
Installing collected packages: PyYaml
Attempting uninstall: PyYaml
Found existing installation: PyYAML 5.4.1
Uninstalling PyYAML-5.4.1:
Successfully uninstalled PyYAML-5.4.1
Successfully installed PyYaml-5.1
WARNING: You are using pip version 20.3.4; however, version 21.3.1 is available.
You should consider upgrading via the '/usr/bin/python -m pip install --upgrade pip' command.
dmjang#a4000:~/work/yolov5$ python3 gen_wts_yoloV5.py -w yolov5n.pt
YOLOv5 🚀 v6.0-255-gca0a007 torch 1.10.2+cu113 CPU
Traceback (most recent call last):
File "gen_wts_yoloV5.py", line 133, in
f = yaml.load(f,Loader=yaml.FullLoader)
AttributeError: module 'yaml' has no attribute 'FullLoader'
still not solved...
Next I tried pip3 command instead pip.
so It is solved.

pygame py2app Library not loaded: #loader_path/.dylibs/libSDL-1.2.0.dylib

I wouldn't call myself a programmer and am unfamiliar with Mac and Linux, so any links or pointers to additional background would help greatly. I've started with the most basic pygame I could google, (from https://realpython.com/pygame-a-primer/). The test.py and test.app runs on my VM but not on anyone else's real Macs.
test.py file
import pygame
pygame.init()
screen = pygame.display.set_mode((400, 300))
done = False
while not done:
for event in pygame.event.get():
if event.type == pygame.QUIT:
done = True
pygame.display.flip()
setup.py file
from setuptools import setup
APP = ['test.py']
DATA_FILES = []
OPTIONS = {}
setup(
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)
command to create the test.app
$ python3 setup.py py2app
The test.app runs fine on the VM, but whenever the test.app runs on a real Mac (tested 2, one ran on Catalina ver???) this error message appears:
Traceback (most recent call last):
File "/Applications/test.app/Contents/Resources/__boot__.py", line 101, in <module>
_run()
File "/Applications/test.app/Contents/Resources/__boot__.py", line 84, in _run
exec(compile(source, path, "exec"), globals(), globals())
File "/Applications/test.app/Contents/Resources/test.py", line 1, in <module>
import pygame
File "pygame/__init__.pyc", line 120, in <module>
File "pygame/base.pyc", line 14, in <module>
File "pygame/base.pyc", line 10, in __load
File "imp.pyc", line 343, in load_dynamic
ImportError: dlopen(/Applications/test.app/Contents/Resources/lib/python3.7/lib-dynload/pygame/base.so, 2): Library not loaded: #loader_path/.dylibs/libSDL-1.2.0.dylib
Referenced from: /Applications/test.app/Contents/Resources/lib/python3.7/lib-dynload/pygame/base.so
Reason: image not found
2020-05-02 11:27:50.309 test[931:15836] test Error
----------------------------
Working environment: VirtualBox 6.1, macOS Sierra (Version 10.12) with the following:
$ pip list
Package Version
----------- ----------
altgraph 0.17
certifi 2020.4.5.1
macholib 1.14
modulegraph 0.18
pip 20.1
py2app 0.21
pygame 1.9.6
setuptools 39.0.1
wheel 0.34.2
$ brew list --versions
freetype 2.10.1
gdbm 1.18.1
jpeg 9d
libmikmod 3.3.11.1
libogg 1.3.4
libpng 1.6.37
libtiff 4.1.0
libvorbis 1.3.6
openssl#1.1 1.1.1g
pkg-config 0.29.2_3
python 3.7.7
readline 8.0.4
sdl 1.2.15_1
sdl2 2.0.12_1
sdl_image 1.2.12_7
sdl_mixer 1.2.12_3
sdl_ttf 2.0.11_1
sqlite 3.31.1
webp 1.1.0
xz 5.2.5
Any ideas or pointers would be greatly appreciated. The actual program is an OhHell card game which supports Windows clients (via pyinstaller), but I'm also trying to support a Mac client to play with my friends on a Mac. Similar to the test.py and test.app (ohhell.py and ohhell.app) runs on the VM Mac but same issue/error occurs with real macs. I've just included the simplest code snippet that I was able to google that reproduced the exact error message.
-john
Workaround Solution: Linking to a dynamic library on a Mac with full path and What path does #loader_path resolve to?. Using the '$ install_name_tool -change "#loader_path/.dylibs/libSDL-1.2.0.dylib" "/Applications/test.app/Contents/Frameworks/libSDL-1.2.0.dylib" base.so' resolved the Library not loaded: loader_path/.dylibs/libSDL-1.2.0.dylib errors. I assume this hard codes the path, but with my friends it's fine to tell them to make sure it resides in the /Applications folder.
However a secondary problem came up, 'pygame.error: File is not a Windows BMP file'. I used py2app, so the pygame delete and reinstall threads didn't seem like a feasible solution (pygame unnecesary w/py2app), so switching the images to uncompressed bitmap (256 colors) worked.
For those curious, I did try Pyinstaller for Mac but that presented a whole new set of problems.

Error installing NLTK in Python 3.4

I'm transitioning to python 3.4 and trying to install NLTK.
Pyyaml and numpy are installed, setuptools and pip as well - all in the newest version- Win 7 64bit.
However, NLTK puzzles me with an error no matter how I try to install it. Here is the cmd-output of my last try. Btw, haven't changed the files in any way ;)
Does anyone know what I could do to get NLTK up and running?
C:\Python34\Scripts\nltk-3.0a4>python setup.py install
running install
Traceback (most recent call last):
File "setup.py", line 81, in <module>
zip_safe=True, # since normal files will be present too?
File "C:\Python34\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python34\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python34\lib\site-packages\setuptools\command\install.py", line 65, i
n run
self.do_egg_install()
File "C:\Python34\lib\site-packages\setuptools\command\install.py", line 101,
in do_egg_install
cmd.ensure_finalized() # finalize before bdist_egg munges install cmd
File "C:\Python34\lib\distutils\cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "C:\Python34\lib\site-packages\setuptools\command\easy_install.py", line
304, in finalize_options
self.index_url, search_path = self.shadow_path, hosts=hosts,
File "C:\Python34\lib\site-packages\setuptools\package_index.py", line 269, in
__init__
Environment.__init__(self,*args,**kw)
File "C:\Python34\lib\site-packages\pkg_resources.py", line 799, in __init__
self.scan(search_path)
File "C:\Python34\lib\site-packages\pkg_resources.py", line 829, in scan
self.add(dist)
File "C:\Python34\lib\site-packages\pkg_resources.py", line 849, in add
dists.sort(key=operator.attrgetter('hashcmp'), reverse=True)
TypeError: unorderable types: str() < NoneType()
Sorry, sometimes its the most obvious things that work...
In this case, simply double clicking the setup.py file from the nltk folder, allowing windows to execute it with python and its installed beautifully.
Try to install it using the following command
C:\Python34\Scripts\nltk-3.0a4>setup.py install
Open Command Prompt (Run as Administrator). Use cd to navigate to the folder in which your downloaded nltk package is present. Then run the command python setup.py install. That's all.
Did you try updating the setuptools package:
pip3 install --upgrade setuptools

Kivy pygame error

I've been trying to get Kivy to work on my Mac (Lion), but I've been encountering issues. I followed the instructions on the Kivy site, and since Kivy 1.8 supports Python 3, I wanted to run it with 3.3, and I finally got that to work, by editing the kivy file to point to 3.3 instead of 2.7. I tried drop a .py program on the Kivy icon, the app opened but nothing happened. So I tried to run it from the command line. It opened 3.3, as expected, but I got the following error.
Python 3.3.4 (default, Mar 6 2014, 20:14:14)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygame
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Applications/Kivy.app/Contents/Resources/lib/sitepackages/pygame/__init__.py", line 127, in <module>
from pygame.base import *
ImportError: dlopen(/Applications/Kivy.app/Contents/Resources/lib/sitepackages/pygame/base.so, 2): Symbol not found: _PyCObject_Type
Referenced from: /Applications/Kivy.app/Contents/Resources/lib/sitepackages/pygame/base.so
Expected in: flat namespace
in /Applications/Kivy.app/Contents/Resources/lib/sitepackages/pygame/base.so
I have no idea why I would get this error, since I previously installed pygame for 3.3, and import pygame or from pygame.base import * work error free. Would this issue with pygame explain why .py files fail to execute when I drop them onto the Kivy icon?
Kivy.app and all the dependencies included in it is compiled with and for Python 2.7. You cannot use it for 3.3.
If you want to try Kivy with 3.3, you also need to compile Kivy yourself :)

ImportError: No module named exceptions

i'm trying to install kitsune in the ubuntu terminal. I am not able to initialize the database. When i give the command ./manage.py syncdb --migrate , i get the following error
Error: Tried importing 'settings_local.py' and 'settings.py' but neither could be found (or they're throwing an ImportError). Please come back and try again later.Traceback (most recent call last):
File "./manage.py", line 30, in <module>
from kitsune import settings # Assumed to be in the same directory.
File "/home/user/kitsune/kitsune/settings.py", line 740, in <module>
import djcelery
File "/usr/local/lib/python2.7/dist-packages/djcelery/__init__.py", line 22, in <module>
from celery import current_app as celery # noqa
File "/usr/local/lib/python2.7/dist-packages/celery/five.py", line 307, in __getattr__
module = __import__(self._object_origins[name], None, None, [name])
File "/usr/local/lib/python2.7/dist-packages/celery/_state.py", line 20, in <module>
from celery.utils.threads import LocalStack
File "/usr/local/lib/python2.7/dist-packages/celery/utils/__init__.py", line 24, in
<module>
from celery.exceptions import CPendingDeprecationWarning, CDeprecationWarning
File "/usr/local/lib/python2.7/dist-packages/celery/exceptions.py", line 13, in <module>
from billiard.exceptions import ( # noqa
ImportError: No module named exceptions
I can't find the exceptions file in billiard. How do I fix this error?
I had this error with fabric. The error message was the same:
ImportError: No module named exceptions
It turned out to be my fabric was out of date. The error was resolved by upgrading fabric to the latest version (1.10) with:
$ sudo pip install fabric --upgrade
For your information, I am running Ubuntu 12.04 64-bit with Python 2.7.3
Exceptions should be a python file in a directory called billiard, for example, you create a file called exceptions.py and add the classes and methods that you need .. this can work around the problem.
You should follow kitsune installation process described in http://kitsune.readthedocs.org/en/latest/hacking_howto.html
There is a link to separate chapter on vendor-packages http://kitsune.readthedocs.org/en/latest/vendor.html#vendor-chapter. You should install all the vendor packages needed by kitsune including billiard and celery (your errors).