I am trying to install Boa Constructor on windows 7. I am using python 27.
After installing when i run Boa.py it gave me an error
Starting Boa Constructor v0.6.1
importing wxPython
reading user preferences
Created directory: C:\Users\SONY\.boa-constructor
Created directory: C:\Users\SONY\.boa-constructor\docs-cache
Created directory: C:\Users\SONY\.boa-constructor\Plug-ins
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\boa-constructor\Boa.py", line 271, in <mod
ule>
import Preferences, Utils
File "C:\Python27\Lib\site-packages\boa-constructor\Preferences.py", line 151,
in <module>
execfile(file)
File "C:\Users\SONY\.boa-constructor\prefs.rc.py", line 26, in <module>
splitterStyle = wx.SP_LIVE_UPDATE | wx.SP_3DSASH | wx.NO_3D
AttributeError: 'module' object has no attribute 'NO_3D'
Can somebody please help
Boa Constructor appears to be importing wx incorrectly. It should not be doing this: import wxPython. That was deprecated many years ago. I am guessing you are using wxPython 3.x, which Boa Constructor does not support. If you want to continue using this tool, you will have to downgrade your wxPython installation.
I too faced the same problem and downgrading to wxPython version 2.8.12.1 worked for me.
If you want to keep using Boa you might want to look at this fork of it.
https://bitbucket.org/cwt/boa-constructor
Looks pretty active and seems to be running against recent versions of wxPython.
to run the BOA Constructor in Python 2.7, you can use wxPython version 2.8.11.0. or 2.8.12.1
for a more complete solution, you can read it here :
http://sourceforge.net/p/boa-constructor/discussion/5483/thread/e6f45f66/
to download wxpython version above, please go to here :
http://www.lfd.uci.edu/~gohlke/pythonlibs/#wxpython
Related
I'm running into this issue after installing USDZ tools from Apple's website. I'm a bit rusty at Python and tried installing all the underlying packages.
I set my PYTHONPATH already using export PYTHONPATH="/Users/gt/usdpython/USD/lib/python:$PYTHONPATH"
USD git:(master) ✗ usdzconvert
Traceback (most recent call last):
File "/Users/gt/usdpython/usdzconvert/usdzconvert", line 17, in <module>
usdUtils.printError("failed to import pxr module. Please add path to USD Python bindings to your PYTHONPATH.")
NameError: name 'usdUtils' is not defined
Download the latest version – usdpython 0.66 from https://developer.apple.com.
You need to paste these 3 lines inside .zshrc file – you can see how to create it HERE.
export PYTHONPATH="/Users/gt/usdpython/USD/lib/python:$PYTHONPATH"
export PATH="/Users/gt/usdpython/USD:$PATH"
export PATH="/Users/gt/usdpython/usdzconvert:$PATH"
P.S.
Do not use the version of usdpython_0.63 (Feb 5, 2020) because it unfortunately causes errors.
Run Rosetta Terminal fixes it.
https://developer.apple.com/forums/thread/671459
I am relatively new to Linux/Ubuntu (so please take it easy on me) and I am trying to install Autokey to use the text expansion functionality. I have tried installing it from the instructions on the Github page here - https://github.com/autokey/autokey#installation
However, no matter whether I follow the installation process under the Ubuntu/Mint/Debian section or the instructions to install via pip I cannot seem to get the program working.
The installation seems to be successful (running a 'which' command gives the path installed) but clicking on the icon does not launch the program.
I have also tried to install directly from Ubuntu/GNOME software manager but that also will not launch the program once installed.
I have tried installing both the GTK and QT frontends and neither will launch. I don't get an error message or anything. I have opened up the System Monitor to see if a process even appears (however briefly) and there's nothing.
Typing autokey-gtk into Terminal gives:
/usr/local/lib/python2.7/dist-packages/autokey/gtkapp.py:24: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
from gi.repository import Gtk, Gdk, GObject, GLib
Traceback (most recent call last):
File "/usr/local/bin/autokey-gtk", line 20, in <module>
from autokey.gtkapp import Application
File "/usr/local/lib/python2.7/dist-packages/autokey/gtkapp.py", line 28, in <module>
import service, monitor
File "/usr/local/lib/python2.7/dist-packages/autokey/service.py", line 21, in <module>
from iomediator import Key, IoMediator
File "/usr/local/lib/python2.7/dist-packages/autokey/iomediator.py", line 107, in <module>
from interface import *
File "/usr/local/lib/python2.7/dist-packages/autokey/interface.py", line 29, in <module>
from Xlib import X, XK, display, error
ImportError: No module named Xlib
Can anyone please help? Thank you.
I am a newbie too and installed Autokey 0.90.4, which did not work for me either. Someone suggested I try 0.95.1 because the other version is 7 years old.
I installed the new version with some acrobatics from the Autokey Github page, using the PIP method. At 1st it did not work, but after doing import setuptools it did. That might be a coincidence since it was after installation of the Ak package itself.
I know this sounds convoluted, but I am not familiar (yet?) with Linux. Anyway 0.95 works for me.
install module python-xlib and it will work, like this:
On Deb:
apt install python3-xlib
You might later need python autokey module as well:
pip install autokey
I am running Python 3.5 on Windows 8. I am trying to install pygame. I downloaded and ran
pygame-1.9.2a0.win32-py3.2.msi (6.4 Mb)
from
http://www.pygame.org/download.shtml
From python I get, after starting a new session:
>>> import pygame
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
import pygame
ImportError: No module named 'pygame'
How do I install? Was my PythonPath updated? Looking at sys.path, it doesn't look like it. How do I get Python to see the library? Where was the library installed? Thanks for the help.
Update1:
The first step i the pygame intsaller states "Select Python Installations - Select the locations where pygame-1.9.2a0 should be installed." Underneath that is a selection that states "Python from another location". This doesn't make sense to me. Anyone?
Update2: I solved the problem - I reinstalled python in the default location (it wasn't before). The pygame installer doesn't seem to support custom installations. Ok, fixed. Thanks all for the help.
Up to now, Windows binaries must match the Python binaries. ...py-3.2.msi is for 3.2 and will not work with 3.5. Either get a 3.5 binary from the site you already used or use pip to install pygame-1.9.2a0-cp35-none-win32.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/ Use pip install /? to get info on how to install from somewhere other than pypi. It might be easier to download the file to your machine first. The site above says a bit about this.
Make sure you have 32-bit python and pygame.
I am trying to run PyQt4 in Maya 2014 and I keep getting the error that no modules was found etc.
I am a Mac user on OS X 10.7.5 and I have tried running the installation following this link as my guide.
Unfortunately though I am able to install everything as stated, but as I am unable to get the IDLE.app from MacPorts, thus I tried checking whether the PyQt4 is installed either by terminal or through Maya itself where I typed in from PyQt4.QtGui import *
However both methods still state the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named PyQt4.QtGui
Can anyone help me through? Or do I still need to install something else just for Maya-usage?
It would seems that the python package in my machine is Python 2.7.1 as depicted from the terminal
For 2014+ you may want to use PySide, which comes with your Maya and won't need separate installation.
I am having a problem with tkinter.ttk on mac. I am using macports and python3.1. When I try to use tkinter.ttk I get very old looking gui elements.
eg: I get this
Instead of this:
The code I used is:
from tkinter import *
from tkinter import ttk
root = Tk()
button = ttk.Button(root, text="Hello World").grid()
root.mainloop()
I would be happy to provide any information from my computer needed to answer this question. As I am a novice programer please tell me where to find said information.
I have a Macbook 5,2 with Snow Leopard installed. Any help would be appreciated.
Thanks, Marlen
Question Update:
I installed tk #8.5.9_0+quartz as schlenk suggested only to get this error:
TclMacOSXNotifierAddRunLoopMode: Tcl not built with CoreFoundation support Abort trap
I fixed this error with the patch from https://trac.macports.org/ticket/22954. I followed the instructions to the letter(they are):
$ cd /opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/tcl
$ sudo patch < ~/Downloads/tcl.2.patch
$ sudo port install tcl
This created a new error which is:
Traceback (most recent call last):
File "hello.py", line 5, in <module>
root = Tk()
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/tkinter/__init__.py", line 1632, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable tk.tcl in the following directories:
/opt/local/lib/tcl8.5/tk8.5 /opt/local/lib/tcl8.5/tk8.5/Resources/Scripts /opt/local/lib/tk8.5 /opt/local/lib/tk8.5/Resources/Scripts /opt/local/Library/Frameworks/Python.framework/Versions/3.1/Resources/Python.app/Contents/lib/tk8.5 /opt/local/Library/Frameworks/Python.framework/Versions/3.1/Resources/Python.app/Contents/lib/tk8.5/Resources/Scripts /opt/local/Library/Frameworks/Python.framework/Versions/3.1/Resources/Python.app/lib/tk8.5 /opt/local/Library/Frameworks/Python.framework/Versions/3.1/Resources/Python.app/Contents/library
/opt/local/lib/tk8.5/tk.tcl: version conflict for package "Tk": have 8.5.7, need exactly 8.5.9
version conflict for package "Tk": have 8.5.7, need exactly 8.5.9
while executing
"package require -exact Tk 8.5.9"
(file "/opt/local/lib/tk8.5/tk.tcl" line 20)
invoked from within
"source /opt/local/lib/tk8.5/tk.tcl"
("uplevel" body line 1)
invoked from within
"uplevel #0 [list source $file]"
This probably means that tk wasn't installed properly.
The problem might be macports. There are three versions of Tk you could use as the basis for your ttk. The screenshot looks a lot like the older X11 Tk, not the aqua based Tk.
1. Tk via X11.
2. Tk compiled with Carbon 'windowingsystem -aqua'
3. Tk compiled with Cocoa
So you should try to either build a Tk variant 'quartz' via macports or you should get some prebuilt version (e.g. ActiveStates) that has the right version already built.
So try:
sudo port build tk #8.5.9+quartz
Have a look at tutorials here for some more guidance:
http://www.tkdocs.com/tutorial/install.html#installmac
try
style = ttk.Style()
print(style.theme_names())
style.theme_use('default') # change 'default' to something better
I haven't played with ttk, however I have a decent amount of experience with tkinter. I belive you have to fill out the style keyword argument.
I think it would look something like this.
from tkinter import *
from tkinter import ttk
root = Tk()
button = ttk.Button(root, text="Hello World", style="somestyle").grid()
root.mainloop()
Link to some relevant documentation:
http://docs.python.org/release/3.1.3/library/tkinter.ttk.html