ModuleNotFoundError: No module named 'pyvjoy' - python

I am currently trying to install a python module named "pyvjoy" (https://github.com/tidzo/pyvjoy) but I run into an error after importing
here's the error:
Traceback (most recent call last):
File "runner.py", line 5, in
import PlayHelper
File "C:\Users\Slay\Desktop\RLBot-master\PlayHelper.py", line 1, in
import pyvjoy
ModuleNotFoundError: No module named 'pyvjoy'
I have tried to install it via copying the library to C:\Python27\Lib\site-packages but no luck

1) You should be using a package manager instead of manually managing every package. Corollary: never use peoples code that isnt on pipy or conda, it means they havent gone through the effort to publish it and dont really expect anyone to use it.
2) You might like pygame or Tkinter for getting joystick input. Mature libraries that have been around for a while are almost always better then some dudes github project with 13 commits.

Related

Speech Recognition module not working, despite being downloaded

I was following along a tutorial where they used the SpeechRecognition module, but when I made it to the first test it returns C:\Users\USER\PycharmProjects\Fatawi\venv\Scripts\python.exe C:/Users/USER/PycharmProjects/Fatawi/main.py Traceback (most recent call last): File "C:\Users\USER\PycharmProjects\Fatawi\main.py", line 1, in <module> import speech_recognition as sr ModuleNotFoundError: No module named 'speech_recognition'
I've tried reinstalling the library multiple times along with the PyAudio library. I ran the test that PyPi has for it and it works, but I don't know how fix it from here.
Check your python interpreter environment (the python version that's run the python file) maybe it's not the same version as python when you downloaded Speech Recognition.
Check if you activating the environemt.
For better understand see this blog in geeks for geeks might help you.
So aftergoing through some of the settings of the project file and checking the Python Interpreter it didn't have the SpeechRecognition Package. So I'm assuming that something went wrong with the install.
Thank you Faisal Faraj for the help.

What is pymunkoptions?

I'm pretty frustrated and I'm not even sure where to start. I'm trying to install python arcade and it's going poorly. I'm trying to run one of the tutorial scripts and I get back the following error.
Traceback (most recent call last):
File "", line 4, in
import arcade
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/arcade/init.py", line 103, in
from .drawing_support import calculate_hit_box_points_detailed
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/arcade/drawing_support.py", line 7, in
import pymunkoptions
ModuleNotFoundError: No module named 'pymunkoptions'
pymunk is saying it's installed. Does arcade not work on python 3.9?
I had the same problem.
I got round it by specifying that the version of pymunk needs to be 5.7.0 (apparently it's been updated since 5.7.0 and Arcade still needs to tweak some things to work properly).
In the requirements.txt in Pycharm (if you're following the instructions here: https://arcade.academy/venv_install/index.html), I put both:
arcade
pymunk==5.7.0
Did the trick for me.
File paths were setup incorrectly.

Error importing opencv, unable to import VideoCapturePlayer

I am trying to work with OpenCV in Python 2.7, however when I simply import cv2, I am getting this error:
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "cv2.py", line 9, in <module>
from VideoCapturePlayer import *
ImportError: No module named VideoCapturePlayer
I figured that VideoCapturePlayer may be in pygame or pycam, but when I import both, no problems arise.
I have searched my folders and the web for VideoCapturePlayer. My folders do not contain it, and the internet provided a .py file, but I do not know where I should put it. Any help is greatly appreciated, thank you.
Edit: I guess I should include that I am on Windows 7 64-bit
The link you provided is for downloading the entire OpenCV project, including all the libraries and bindings for C++, Java, etc. etc. For the Python bindings, it's much easier to visit my favorite module site on the Internet, Christoph Gohlke's Python Extension Packages for Windows repository. Find the OpenCV section, pick AMD64 or Win32, pick py2.7 or py2.6, and wait a bit for the self-extracting archive to download. Run it, hit OK for all the prompts, and you should be all set. Fire up IDLE or run python from the command line, and running import cv2 should give you no response at all - indicating that everything got set up just fine.
Good luck!

Versioning module in python missing

When i compile s3cmd, I found Versioning module is missing, stacktrace as:
Traceback (most recent call last):
File "./s3cmd", line 1983, in <module>
from S3.S3 import S3
File "/home/chutong/s3cmd.svn/S3/S3.py", line 29, in <module>
from Versioning import Versioning
ImportError: No module named Versioning
I tried to check online and there is not much resource? Can someone please help? Thanks
I just checked the source for s3cmd on github. It appears it no longer imports this module nor does it contain a module named Versioning in its code tree.
Without more information I can't tell, but what I would suspect is you have a version mismatch, perhaps one version installed in your Python environment and another one locally.
It's a bit odd that it's raising the exception from an SVN directory, but like I say, will need more information about your execution environment to make any headway. Things like current directory, a dump of sys.path, that sort of thing.
But if it's possible, you might try updating the installed version and trying again. Looks like the library has had some significant updates since the version you appear to be using.

Trouble importing Python modules on Ninja IDE

I have been trying to import modules into Ninja IDE for python. These are modules that I have working on the terminal (numpy, scipy, scitools, matplotlib, and mpl_toolkits), but will not run correctly in Ninja.
First I was only getting the message No module named ____. I checked sys.path and found that the path was within the application
/Applications/Ninja IDE.app/Contents/Resources/lib/python2.7 was a typical path. I tried changing the path,but it doesn't seem to do anything to sys.path even after restarting the ide.
But I wanted the path to refer to where the modules are stored (which is /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages). I was able to get numpy and scipy to work as well as parts of mpl_toolkits by adding the contents of my path to the folders that sys.path gave. However, I still can't get fully functioning modules within the ninja ide interpreter. I'll give some examples below of what happens when I import certain modules.
import matplotlib.pyplot
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/Applications/Ninja IDE.app/Contents/Resources/lib/python2.7/matplotlib/__init__.py", line 106, in <module>
ImportError: No module named sysconfig
import mpl_toolkits
from mpl_toolkits.mplot3d import axes3d
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/Applications/Ninja IDE.app/Contents/Resources/lib/python2.7/mpl_toolkits/mplot3d/__init__.py", line 1, in <module>
File "/Applications/Ninja IDE.app/Contents/Resources/lib/python2.7/mpl_toolkits/mplot3d/axes3d.py", line 14, in <module>
File "/Applications/Ninja IDE.app/Contents/Resources/lib/python2.7/matplotlib/__init__.py", line 106, in <module>
ImportError: No module named sysconfig
Thanks for the help. I apologize, I am very new to programming, but I did put in about a day and a half of research before posting here.
That's strange as the sysconfig module is a part of Python 2.7 standard library.
Are you sure that Ninja is using the right Python version? Try running:
import sys
print sys.version_info
from Ninja, to see which Python version it is actually using.
I know this question is a few months old, but I wanted to post my solution in case others find it useful. I had a very similar problem, and had a lot of trouble finding a quick workable solution anywhere.
My somewhat roundabout solution was to simply create a virtualenv folder with the version of numpy I wanted, and then pointed the "virtualenv" property for NinjaIDE project to that folder. I restarted NinjaIDE and boom, instantly worked.
To set the virtualenv property for your project via the GUI, go to the Project menu:
Project > Open Project Properties > Project Execution,
and you should see a variable called "Virtualenv Folder". Point that to the folder for your virtualenv, and it should work. (May need to restart NinjaIDE.) This worked for me, NinjaIDE version 2.2 under Ubuntu 12.04.
One quick note: I actually didn't use virtualenv exactly -- I had to use a "conda env," since I am using the Anaconda distribution, and apparently it is not well-tested with virtualenv yet. (I actually got a warning when I went to easy_install virtualenv. Hadn't seen that before.)
Either way, this stackoverflow question has some nice pointers to virtualenv tutorials: Comprehensive beginner's virtualenv tutorial?
Good luck!
I was having a similar problem trying to import a module from /home/paul/lib/python using the console of the Ninja-IDE. I found out that /home/paul/lib/python didn't appear in syspath when checking in the console of the Ninja-IDE. But it did in the terminal!
By starting the Ninja-IDE from the terminal, /home/paul/lib/python was in syspath when checking in the console of the Ninja-IDE. I was now able to import the module I needed.
I hope this might be of some help. If not to ebris1 than maybe to others.

Categories