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.
Related
I have pip'd pycryptodome and criptography today to use in the Spyder IDE but keep getting the error at the bottom of this page when I try to import them.
However, If I try to import them in Sublime Text or IDLE they seem to be working fine.
I am not running Spyder form Anaconda as I was having other issues there with the input() function and am just running it from my Windows platform.
I have tried uninstalling the modules as well as Spyder itself to no avail, had my uni lecturer looking at it this afternoon as well with no such luck.
Python Version 3.9.6
Spyder Version 5.3.1
Any advice? If I need to give more info please let me know what you need and I'll try to get it.
Thanks in advance :)
ERROR MESSAGE:
runfile('[Omitted path and filename].py', wdir='[Omitted path and filename]')
Traceback (most recent call last):
File "C:\Users\Me\AppData\Local\Programs\Spyder\pkgs\spyder_kernels\py3compat.py", line 356, in compat_exec
exec(code, globals, locals)
File "[Omitted path and filename].py", line 9, in
from Crypto.Cipher import DES
ModuleNotFoundError: No module named 'Crypto'
Warning
It seems you're trying to use a module that doesn't come with our installer. Check this FAQ in our docs to learn how to do this.
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.
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!
I'm doing some image analysis for my research, and it involves using CellTool (http://pantheon.yale.edu/~zp2/Celltool/), Python, and numpy. I'm on a OS X 10.8.3. On my old laptop that crashed, I was able to run my commands fine, but I got a new one and things are not going as smoothly!
I believe I have CellTool and numpy installed correctly, and I'm just using Python 2.7.2 that's standard on Mac. But when I try to run this python script "calculate_distances.py" command, I get this error:
Yuxins-MacBook-Pro:Modified_Contours yuxinsun$ python calculate_distances.py
Traceback (most recent call last):
File "calculate_distances.py", line 24, in <module>
normals = contours[n-1].inward_normals()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/celltool/contour/contour_class.py", line 384, in inward_normals
import celltool.numerics.fitpack as fitpack
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/celltool/numerics/fitpack/__init__.py", line 1, in <module>
from fitpack import *
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/celltool/numerics/fitpack/fitpack.py", line 34, in <module>
import _fitpack
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/celltool/numerics/fitpack/_fitpack.so, 2): Library not loaded: /usr/local/lib/libgfortran.2.dylib
Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/celltool/numerics/fitpack/_fitpack.so
Reason: image not found
And I have no idea what any of it means...I only need to run this python script and get the file that it spits out.
Am I just missing the "fitpack" whatever that is? If so, how do I install it? Or what can I do to fix this problem.
You need to make sure you have those installed per installation requirements:
If one of the above binary installers did not suit your needs,
please install Celltool from the source code.
This depends on only three things:
1.Python (version 2.3 or later).
2. NumPy 1.0.4 or later.
3. Working C/C++ and Fortran compilers.
and it looks like your Fortran compiler libs are not installed.
This might be helpful: https://scicomp.stackexchange.com/questions/2469/how-should-i-install-a-fortran-compiler-on-a-mac-os-x-10-x-x-4
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.