My company server uses Python 2.4.3. I need to use wxPython, but current version of wxPython requires either Python 2.6 or 2.7.
How do I get wxPython to work with Python 2.4.3 on Windows 7?
http://www.wxpython.org/download.php
P.S. I tried installing "wxPython2.8-win32-unicode-py26" and import wx, but got the following error:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in -toplevel-
import wx
File "C:\Python24\Lib\site-packages\wx-2.8-msw-unicode\wx\__init__.py", line 45, in -toplevel-
from wx._core import *
File "C:\Python24\Lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 4, in -toplevel-
import _core_
ImportError: DLL load failed: The specified module could not be found.
Ok so I figured it out.
Since "wxPython2.8-win32-unicode-py26" (wxPython 2.8.12.1) requires Python 2.6, it would not work if I have Python 2.4.
So I found wxPython 2.8.10.1 which supports Python 2.4, installed it and it works!
Related
I am trying to run a Julia script from python. I have Julia 1.6.4 installed (also tried 1.7.3) and installed pip install julia from Pycharm's terminal in the virtual environment. When importing julia and then running julia.install() I get the following error message:
I use Pycharm with a virtual environment with Python 3.9.7 for my project. However, I have also tried different python versions in different virtual environments or by using the base python installed. All give the same error.
Also, ~/.julia/packages/PyCall/*/deps/build.log does not exist for me.
[ Info: Trying to import PyCall...
Fatal Python error: init_import_size: Failed to import the site module
Python runtime state: initialized
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\site.py", line 73, in <module>
import os
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\os.py", line 29, in <module>
from _collections_abc import _check_methods
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\_collections_abc.py", line 12, in <module>
GenericAlias = type(list[int])
TypeError: 'type' object is not subscriptable
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:\Users\<user>\PycharmProjects\<project>\venv\lib\site-packages\julia\tools.py", line 118, in install
raise PyCallInstallError("Installing", output)
julia.tools.PyCallInstallError: Installing PyCall failed.
** Important information from Julia may be printed before Python's Traceback **
Some useful information may also be stored in the build log file
`~/.julia/packages/PyCall/*/deps/build.log`.```
Julia needs to have PyCall installed
PyCall in Julia needs to be configured to use the same Python that you are using to call Julia from
For more information see this post:
I have a high-performant function written in Julia, how can I use it from Python?
Guys I'm facing a problem on using this module which i install from pip currently my OS is Windows python36 64bit version is install. When i'm using and try to import this module
from drawtree import draw_level_order
draw_level_order('{3,9,20,#,#,15,7}')
Why python giving strange errors like this
Traceback (most recent call last):
File "C:/Users/Root/PycharmProjects/untitled/src/Test.py", line 1, in <module>
from drawtree import draw_level_order
File "C:\Python36-64\lib\site-packages\drawtree\__init__.py", line 7, in <module>
from drawtree import draw_bst, draw_random_bst, draw_level_order
ImportError: cannot import name 'draw_bst'
The version of drawtree on PyPI is not currently compatible with Python 3. There's a Python 3-compatible version on Github, if you really want to use drawtree on Python 3.
I recently downloaded and installed pygame. I tested it with the following code.
import pygame
I received the following error:
C:\Python34>python test.py
Traceback (most recent call last):
File "test.py", line 1, in <module>
import pygame
File "C:\Python34\lib\site-packages\pygame\__init__.py", line 95, in <module>
from pygame.base import *
ImportError: DLL load failed: The specified module could not be found.
I currently have Python 3.4 32 bit and have downloaded pygame-1.9.2a0.win32-py3.2 and installed it. I tried uninstalling and reinstalling multiple times. What am I doing wrong?
Pygame doesn't work for Python 3.4. The pygame that you downloaded is for Python 3.2. If you download Python 3.2, you should be able to use pygame.
I have installed Python 3.4.0 on a Win Vista Home Premiun 32bit machine with "Service Pack 2" installed.
Python installed to C:\Python34
I then chose the pygame windows binary pygame-1.9.2a0.win32-py3.2 since this is the closest to Python 3.4.0.
When in the shell or via a .py file and I use from pygame import *, I get the following error:
*Traceback (most recent call last):
File "C:/Users/Stuart/Desktop/Python Project files/g.py", line 1, in <module>
from pygame import *
File "C:\Python34\lib\site-packages\pygame\__init__.py", line 95, in <module>
from pygame.base import *
ImportError: DLL load failed: The specified module could not be found.*
I found a pygame install for python 3.4 at http://www.lfd.uci.edu/~gohlke/pythonlibs/
Im trying to use a lib on bsd that was designed for linux for IBM-db connections:
I have installed as per the ibmdocs for linux, and placed the required linux libs in /compat/linux/lib/
But i get the import error:
>>> import ibm_db
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: Shared object "libdb2.so.1" not found, required by "ibm_db.so"
If I place the file manually in /usr/lib or symlink it I get a read error:
>>> import ibm_db
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: /usr/lib/libdb2.so.1: Undefined symbol "strcspn"
If anyone could help on this I would be forever grateful!!
I have installed ibm_db and both ibm_db_sa without failure, I just think its more of an issue trying to use the linux app on bsd.
Since it's looking for libraries in /usr/lib, you seem to be running the FreeBSD version of Python.
Since FreeBSD's Linux compatibility is a per process compatibility, you cannot load Linux libraries into a FreeBSD process. If you want to dynamically load Linux libraries, you need to run a Linux version of Python.