I am currently on GNOME and trying to run playonlinux but unfortunately, when I try to launch it, I get this :
"Looking for python... 2.7.11 - Traceback (most recent call last):
File "/usr/share/playonlinux/python/check_python.py", line 1, in <module>
import os, wxversion
ImportError: **No module named wxversion**
failed tests
Looking for python2.7... 2.7.11 - Traceback (most recent call last):
File "/usr/share/playonlinux/python/check_python.py", line 1, in <module>
import os, wxversion
ImportError: **No module named wxversion**
failed tests
Looking for python2.6...
Looking for python2... 2.7.11 - Traceback (most recent call last):
File "/usr/share/playonlinux/python/check_python.py", line 1, in <module>
import os, wxversion
ImportError: **No module named wxversion**
failed tests
Please install python before trying to run this program"
I tried to reinstall Python and Playonlinux but it did not work.
I have python-wxgtk3.0 already installed but when I list all the python packages I have with a little python script, it does not appear ...
My version of Python is 2.7.11.
Does someone know what I can do please ?
Thank you,
Rayan
You can refer this How to install wxPython
Using pip install wxPython-Phoenix (Linux):
sudo pip install --upgrade --pre -f https://wxpython.org/Phoenix/snapshot-builds/ wxPython
OR this SO Post
python-wxversion is available as a separate package.
Use synaptic or apt to install it.
sudo apt show python-wxversion
Package: python-wxversion
Version: 3.0.2.0+dfsg-1build1
Priority: optional
Section: universe/python
Source: wxpython3.0
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss#lists.ubuntu.com>
Original-Maintainer: wxWidgets Maintainers <freewx-maint#lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 64.5 kB
Depends: python:any (<< 2.8), python:any (>= 2.7.5-5~)
Homepage: http://wxpython.org/
Task: edubuntu-desktop-gnome, ubuntustudio-photography
Supported: 9m
Download-Size: 12.7 kB
APT-Manual-Installed: no
APT-Sources: http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
Description: API for selecting the wxPython version to use
wxWidgets (formerly known as wxWindows) is a class library for C++ providing
GUI components and other facilities on several popular platforms (and some
unpopular ones as well).
.
This package provides the wxPython version selector.
In the most recent version of wxPython (4.0.1 as I write this), wxversion is deprecated. See https://docs.wxpython.org/MigrationGuide.html#the-wxversion-module
Just remove the wxversion import, or replace with wx, as I imagine it was just checking the version of wxPython before importing it.
Related
I use this tutorial text as an example, there are others:
#!/usr/bin/python
import MySQLdb
If it produces the following result, then it means MySQLdb module is not installed −
Traceback (most recent call last):
File "test.py", line 3, in <module>
import MySQLdb
ImportError: No module named MySQLdb
To install MySQLdb module, use the following command −
For Ubuntu, use the following command -
$ sudo apt-get install python-pip python-dev libmysqlclient-dev
I have gone trough these steps, more or less as described above.
Problem is that the subdirectory "python" does not exist under /usr/bin/
in my file system. I run Linux Mint 18.3. Python 2.7 seems to be the native version installed in Mint (used for several purposes), but I have also installed Python 3.6.4 and wish to use this for development purposes.
Does anyone know in which directory I could expect to find MySQLdb?
Since #!/usr/bin/python is non existent I wonder - has MySQLdb been properly installed? If it has, I have not after several efforts succeded in locating it.
I have developped a tool under python 2.5 and can't upgrade to a newer python version as I need to use an API developped under python 2.5 as well.
I recently tried my tool under another machine and it seems it hasn't wx module installed as you can see below:
>>> import wx
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
ImportError: No module named wx
So I searched for the wxpython source. However once I tried to install the source with:
D:\tmp\wxPython-4.0.0b2>c:\Python25\python.exe setup.py install
I got following error:
Traceback (most recent call last): File "setup.py", line 15, in
from setuptools import setup, find_packages ImportError: No module named setuptools
I can't either install whl files as I don't have pip.
So, how can I install wxpython for python 2.5 under Windows?
Is there any executable there in the web that I couldn't find? May there be a workaround by copying the wx module from a python directory from another computer?
As I had to install wxpython 2.7.2.0 I finally got it from wxPython2.7-win32-ansi-2.7.2.0-py25.exe.
As stated in Patrick's comment all wxpython executables for any version are under https://sourceforge.net/projects/wxpython/files/wxPython/
In Ubuntu 15.10,Running
python3.4 sound.py
leads to this error:
Traceback (most recent call last):
File "sound.py", line 2, in <module>
import pyglet
ImportError: No module named 'pyglet'
I already installed pyglet with running this command:
sudo easy_install -U pyglet
resulting
Searching for pyglet
Reading https://pypi.python.org/simple/pyglet/
Best match: pyglet 1.2.4
Processing pyglet-1.2.4-py2.7.egg
pyglet 1.2.4 is already the active version in easy-install.pth
Using /usr/local/lib/python2.7/dist-packages/pyglet-1.2.4-py2.7.egg
Processing dependencies for pyglet
Finished processing dependencies for pyglet
I am confused about what is missing. I guess there are some confusion about different verions of python, pyglet or Ubuntu.
From the install output it seems that the installed version of pyglet goes to python 2.7 packages. From your command you are explicitly calling python 3.4 There might be a problem there. python 3.4 will not go to 2.7's packages to check for the module.
I suggest that you call the script using python 2.7. running just python is enough (the default env python)
You can take a look at this question on the installation of python 2 and 3 packages too
The title basically explains it all.
I am running Windows 8 (windows 7 was previously installed... If it helps with answering) and am using Python 2.7.
Upon using the code:
python setup.py install
I am getting this error:
C:\Users\Nicholas\Desktop\taggit>python setup.py install
Traceback (most recent call last):
File "setup.py", line 52, in
from setuptools import setup
ImportError: No module named setuptools
Any help?
Thanks in advance
Nicholas
You need to install setuptools, which allows packages to be configured for your Python installation. It is not included with the default Python installer.
From this link you can download Windows installers for many Python packages (I have linked it directly to setuptools). Make sure you download the version that matches your Python installation.
in Python 3:
pip3 install setuptools
And in Python 2.x:
pip install setuptools
I want to run wexpect (the windows port of pexpect) on my Windows 7 64-bit machine. I am getting the following error:
C:\Program Files (x86)\wexpect\build\lib>wexpect.py
Traceback (most recent call last):
File "C:\Program Files (x86)\wexpect\build\lib\wexpect.py", line 97, in <module>
raise ImportError(str(e) + "This package was intended for Windows like operating systems.")
ImportError: No module named win32console This package requires the win32 python packages.This package was intended for Windows like operatin
g systems.
In the code it is failing on the following line:
from win32console import *
I am using Python 2.6.4. I cannot figure out how to install win32console.
Install this: http://sourceforge.net/projects/pywin32/
Edit to add slightly longer explanation: There's a very useful set of Windows-specific Python modules, called PyWin32. I believe win32console is part of that. You can either install PyWin32 on top of the standard python.org release of Python, or you can install ActiveState ActivePython which bundles everything you need all together. I'm using ActivePython and I have a win32console module.
Install wexpect with pip to install all dependencies (inluding pywin32).
pip install wexpect