hope somebody helps me to install wxPython.
I have ubuntu 11.10 and there is no build package for it.
I used this page ( http://wxpython.org/BUILD.html ) as guidance to install
after installing, I run
>python
>>>import wx
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "wx/__init__.py", line 45, in <module>
from wx._core import *
File "wx/_core.py", line 4, in <module>
import _core_
ImportError: libwx_gtk2u_adv-2.9.so.3: cannot open shared object file: No such file or directory
What should do to fix it?
thank you!
Follow the instructions for installing on Ubuntu or Debian.
EDIT: Actually, you don't even need to do that, since it's in the main repos:
sudo aptitude install python-wxgtk2.8
Related
I tried to instlall Python3-pip on my Linux Debian 8 Server with following command: sudo apt install python3-pip. That worked fine without any problem.
But if I'm checking now the Version of this pip3 module, I get follwing error:
$ pip3 --version
Traceback (most recent call last):
File "/usr/local/bin/pip3", line 7, in <module>
from pip._internal.cli.main import main
File "/usr/local/lib/python3.4/dist-packages/pip/__init__.py", line 1, in <module>
from typing import List, Optional
ImportError: cannot import name 'List'
I tried to somehow solve this problem, but did not get any solution up to now...
Does anybody have had a similar Problem?
I tried to launch first commands of eppy package but I received strange errors:
from eppy import modeleditor
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
from eppy import modeleditor
File "C:\Users\...\AppData\Local\Programs\Python\Python310\lib\site-packages\eppy\modeleditor.py", line 26, in <module>
from eppy.idfreader import idfreader1
File "C:\Users\...\AppData\Local\Programs\Python\Python310\lib\site-packages\eppy\idfreader.py", line 24, in <module>
from eppy.idf_msequence import Idf_MSequence
File "C:\Users\...\AppData\Local\Programs\Python\Python310\lib\site-packages\eppy\idf_msequence.py", line 27, in <module>
class Idf_MSequence(collections.MutableSequence):
AttributeError: module 'collections' has no attribute 'MutableSequence'
I noticed that maybe there are some missing files but I'm not sure. I compared my files with GitHub folder:
Screeshot:
The folder resources is missing...
I don't know if this is the problem.
I installed eppy package simply with the command: pip install eppy
Can you help me?
Thank you very much :-)
Sorry I found the issue.
The problem appears only with Python 3.10, with Python 3.9 disappears.
I don't know why...
Regarding the folder "resources" you have to download it from GitHub, because the installation with pip doesn't download it.
I installed PyTouchBar using pip3
When I tried to import it, however, it gives me this error.
$ python3
>>> import PyTouchBar
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/PyTouchBar/__init__.py", line 5, in <module>
from .TouchBar import *
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/PyTouchBar/TouchBar.py", line 13, in <module>
from Foundation import *
ModuleNotFoundError: No module named 'Foundation'
On Python 2, Foundation works perfectly, by the way.
Could someone tell me how to fix this? Thanks in advance!
I think your problem could be one of these:
You installed PyTouchBar on python2 instead of python3, in which case you have to use:
pip3 install PyTouchBar
You are using a venv and installed from the terminal/command line instead of the venv's terminal
PyTouchBar uses foundation that you have to install separately
I'm trying to use the virtualenvwrapper to make a python 3 based virtualenv. However,I'm when I pass the optional interpreter argument, I'm seeing this error. I'm running Ubuntu 15.04. I tried reinstalling virtualenv and virtualenvwrapper without success. Thanks for all your help!
$ mkvirtualenv scriptcutter --python=/usr/bin/python3
Running virtualenv with interpreter /usr/bin/python3
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 8, in <module>
import base64
File "/usr/lib/python3.4/base64.py", line 9, in <module>
import re
File "/usr/lib/python3.4/re.py", line 336, in <module>
import copyreg
File "/usr/local/lib/python2.7/dist-packages/copyreg/__init__.py", line 7, in <module>
raise ImportError('This package should not be accessible on Python 3. '
ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 53, in apport_excepthook
if not enabled():
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 24, in enabled
import re
File "/usr/lib/python3.4/re.py", line 336, in <module>
import copyreg
File "/usr/local/lib/python2.7/dist-packages/copyreg/__init__.py", line 7, in <module>
raise ImportError('This package should not be accessible on Python 3. '
ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.
Original exception was:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 8, in <module>
import base64
File "/usr/lib/python3.4/base64.py", line 9, in <module>
import re
File "/usr/lib/python3.4/re.py", line 336, in <module>
import copyreg
File "/usr/local/lib/python2.7/dist-packages/copyreg/__init__.py", line 7, in <module>
raise ImportError('This package should not be accessible on Python 3. '
ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.
I come across same issue, but after I downgrade virtualenv to 12.0.2, this problem disappears.
This is sort of a workaround for now.
Create a virtualenv using pyvenv.
# install pyvenv on Ubuntu
sudo apt-get install python3-venv
To minimize disruption in your normal workflow, pass a destination directory that is the same as the one used by virtualenvwrapper Like so,
pyvenv example ~/.virtualenvs/example
This is automatically working with workon and cdproject commands. I don't use much else that is provided by virtualenvwrapper
Hope this helps.
You can upgrade to the most recent version of virtualenv, with:
sudo pip install --upgrade https://github.com/pypa/virtualenv/archive/master.zip
virtualenv --version
# Returns 15.2.0.dev0 when I ran it
The following command then works:
mkvirtualenv scriptcutter --python=/usr/bin/python3
Apparently, the develop branch was dropped, so the URL with "develop" will no longer work. My answer was based off of #pjotr_dolphin's comment, with the URL updated.
I created a virtualbox with a fresh install of ubuntu 9.10.
I am trying to get MySQLdb to run on python but I'm failing at the import MySQLdb
I first tried sudo easy_install MySQL_python-1.2.3c1-py2.6-linux-i686.egg and then sudo apt-get install python-mysqldb.
Both apparently installed ok, but gave me the following error message when in python I have the import line:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.6/dist-packages/MySQL_python-1.2.3c1-py2.6-linux-i686.egg/MySQLdb/__init__.py", line 19, in <module>
File "/usr/local/lib/python2.6/dist-packages/MySQL_python-1.2.3c1-py2.6-linux-i686.egg/_mysql.py", line 7, in <module>
File "/usr/local/lib/python2.6/dist-packages/MySQL_python-1.2.3c1-py2.6-linux-i686.egg/_mysql.py", line 6, in __bootstrap__
ImportError: libmysqlclient_r.so.15: cannot open shared object file: No such file or directory
I have already installed MySQL and it is running, if that matters at all.
I tried following this, but failed in step 2
Your MySQLdb egg installation looks like it is not working properly. You should go into /usr/local/lib/python2.6/dist-packages and remove it.
The Ubuntu python-mysqldb package should work fine. Unless you have a good reason, you should stick to your distribution's package manager when installing new software.