How to install AntTweakbar on Ubuntu 14.04? - python

I followed the instructions for how to install the AntTweakBar python module which I found on the AntTweakBar website (http://anttweakbar.sourceforge.net/doc/tools:anttweakbar:download)
When I try to run my code which uses this library, I get the following error:
Traceback (most recent call last):
File "main.py", line 80, in <module>
from eye import eye
File "/home/phil/pupil-master/pupil_src/capture/eye.py", line 17, in <module>
import atb
File "/home/phil/pupil-master/pupil_src/shared_modules/atb/__init__.py", line 16, in <module>
from raw import *
File "/home/phil/pupil-master/pupil_src/shared_modules/atb/raw.py", line 39, in <module>
__dll__ = ctypes.CDLL(dll_path)
File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /usr/lib/libAntTweakBar.so.1: undefined symbol: _ZTVN10__cxxabiv117__class_type_infoE
So I added a symbolic link from the AntTweakBar/src to a directory in my pupil path using
ln -s pwd /usr/lib/python2.7/dist-packages
Thanks!
Edit: I'm using ctypes.

Related

Why can't I import panda to my python file?

Every time I try to import pandas I get this error and I don't understand why, because I successfully installed it. Here it is:
(base) C:\Users\snin2\Documents\panda python\codigos>C:/Users/snin2/anaconda3/python.exe "c:/Users/snin2/Documents/panda python/codigos/panda1.py"
Traceback (most recent call last):
File "c:/Users/snin2/Documents/panda python/codigos/panda1.py", line 1, in <module>
import pandas as pd
File "C:\Users\snin2\anaconda3\lib\site-packages\pandas\__init__.py", line 11, in <module>
__import__(dependency)
File "C:\Users\snin2\AppData\Roaming\Python\Python37\site-packages\numpy\__init__.py", line 140, in <module>
from . import _distributor_init
File "C:\Users\snin2\AppData\Roaming\Python\Python37\site-packages\numpy\_distributor_init.py", line 26, in <module>
WinDLL(os.path.abspath(filename))
File "C:\Users\snin2\anaconda3\lib\ctypes\__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application
make sure you installed right version of anaconda python.or try to reinstall the python.
Here is the link,
if your system is 64 bit processor = https://repo.anaconda.com/archive/Anaconda3-2021.05-Windows-x86_64.exe
if 32 bit = https://repo.anaconda.com/archive/Anaconda3-2021.05-Windows-x86.exe

Error "Trying to re-register the builtin cmap 'cubehelix' when trying to import the python module "yt"

I installed the Python package yt simply through pip install yt. When I tried to import it, it returns the following error message:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\User\Anaconda3\lib\site-packages\yt\__init__.py", line 63, in <module>
from yt.fields.api import \
File "C:\Users\User\Anaconda3\lib\site-packages\yt\fields\api.py", line 19, in <module>
from . import angular_momentum
File "C:\Users\User\Anaconda3\lib\site-packages\yt\fields\angular_momentum.py", line 26, in <module>
from .vector_operations import \
File "C:\Users\User\Anaconda3\lib\site-packages\yt\fields\vector_operations.py", line 32, in <module>
from yt.geometry.geometry_handler import \
File "C:\Users\User\Anaconda3\lib\site-packages\yt\geometry\geometry_handler.py", line 29, in <module>
from yt.utilities.parallel_tools.parallel_analysis_interface import \
File "C:\Users\User\Anaconda3\lib\site-packages\yt\utilities\parallel_tools\parallel_analysis_interface.py", line 30, in <module>
from yt.data_objects.image_array import ImageArray
File "C:\Users\User\Anaconda3\lib\site-packages\yt\data_objects\image_array.py", line 18, in <module>
from yt.visualization.image_writer import write_bitmap, write_image
File "C:\Users\User\Anaconda3\lib\site-packages\yt\visualization\image_writer.py", line 26, in <module>
from .color_maps import mcm
File "C:\Users\User\Anaconda3\lib\site-packages\yt\visualization\color_maps.py", line 164, in <module>
add_colormap("cubehelix", _cubehelix_data)
File "C:\Users\User\Anaconda3\lib\site-packages\yt\visualization\color_maps.py", line 52, in add_colormap
mcm.register_cmap(name, yt_colormaps[name])
File "C:\Users\User\Anaconda3\lib\site-packages\matplotlib\cm.py", line 149, in register_cmap
raise ValueError(msg)
ValueError: Trying to re-register the builtin cmap 'cubehelix'.
I have tried to search online for solutions but it seems that almost nobody has ever addressed the same issue. I have tried to force reinstall it by pip install --upgrade --force-reinstall yt but still the same error message occurred. How should I solve it?
I googled your error and found https://mail.python.org/archives/list/yt-users#python.org/message/5C2ZTKNETGVY24QY2G6ED33CGFUPRQSW/ from a couple of months ago, which leads to https://github.com/yt-project/yt/pull/3149.
It looks like the workaround could be to downgrade Matplotlib to a version less than 3.4.0.

Scapy OSError when importing scapy.all: 'wpcap.dll' does not exsist

I tried to import scapy.all, but an error saying 'wpcap.dll' does not exist. Why does this happen? I am sure I downloaded everything correctly. I saved everything into a folder called scapy . I got an OSError from module ctypes. Does Python expect me to have something pre-installed?
This is my error (I used scapy.scapy.all since I saved it into a folder)
>>> import scapy.scapy.all
WARNING: Windows support for scapy3k is currently in testing. Sniffing/sending/receiving packets should be working with WinPcap driver and Powershell. Create issues at https://github.com/phaethon/scapy
Traceback (most recent call last):
File "<pyshell#12>", line 1, in <module>
import scapy.scapy.all
File "C:\Python34\scapy\scapy\all.py", line 16, in <module>
from .arch import *
File "C:\Python34\scapy\scapy\arch\__init__.py", line 88, in <module>
from .windows import *
File "C:\Python34\scapy\scapy\arch\windows\__init__.py", line 23, in <module>
from scapy.scapy.arch import pcapdnet
File "C:\Python34\scapy\scapy\arch\pcapdnet.py", line 32, in <module>
from .winpcapy import *
File "C:\Python34\scapy\scapy\arch\winpcapy.py", line 26, in <module>
_lib=CDLL('wpcap.dll')
File "C:\Python34\lib\ctypes\__init__.py", line 351, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
>>>
Make sure you have WinPcap installed in order to use scapy.

Using ensurepip to install pip

I am trying to ensure that a library is installed in a blender instance.
I found out about ensurepip and am attempting to use it to install pip. Then I can install the external library.
However ensurepip.bootstrap() gives me the following error:
ensurepip.bootstrap()
Traceback (most recent call last):
File "<blender_console>", line 1, in <module>
File "C:\Program Files\Blender Foundation\Blender\2.74\python\lib\ensurepip\__init__.py", line 116, in bootstrap
_run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
File "C:\Program Files\Blender Foundation\Blender\2.74\python\lib\ensurepip\__init__.py", line 40, in _run_pip
import pip
File "C:\Users\Ethan\AppData\Local\Temp\tmpqn93iwq6\pip-1.5.6-py2.py3-none-any.whl\pip\__init__.py", line 9, in <module>
File "C:\Users\Ethan\AppData\Local\Temp\tmpqn93iwq6\pip-1.5.6-py2.py3-none-any.whl\pip\log.py", line 8, in <module>
File "C:\Users\Ethan\AppData\Local\Temp\tmpqn93iwq6\pip-1.5.6-py2.py3-none-any.whl\pip\backwardcompat\__init__.py", line 98, in <module>
ImportError: No module named 'distutils'

PyOpenGL-accelerate + numpy

I'm installing MakeHuman on Debian, so all dependencies was set up, but when launching it's an error:
SYS.PLATFORM: linux2
PLATFORM.MACHINE: x86_64
PLATFORM.PROCESSOR:
PLATFORM.UNAME.RELEASE: 2.6.32.26
PLATFORM.LINUX_DISTRIBUTION: debian 6.0.6
NUMPY.VERSION: 1.6.2
OpenGL_accelerate module loaded
Using accelerated ArrayDatatype
Unable to load numpy_formathandler accelerator from OpenGL_accelerate
Unable to load registered array format handler numeric
Traceback (most recent call last):
File "makehuman.py", line 310, in <module>
main()
File "makehuman.py", line 300, in main
from mhmain import MHApplication
File "./core/mhmain.py", line 32, in <module>
import mh
File "./lib/mh.py", line 29, in <module>
from glmodule import updatePickingBuffer, grabScreen, hasRenderSkin, renderSkin
File "./lib/glmodule.py", line 33, in <module>
from OpenGL.GL import *
File "/usr/lib/python2.7/dist-packages/OpenGL/GL/__init__.py", line 3, in <module>
from OpenGL.raw.GL.annotations import *
File "/usr/lib/python2.7/dist-packages/OpenGL/raw/GL/annotations.py", line 40, in <module>
'v',
File "/usr/lib/python2.7/dist-packages/OpenGL/arrays/arrayhelpers.py", line 197, in setInputArraySizeType
function.setPyConverter( argName, asArrayTypeSize(type, size) )
File "arraydatatype.pyx", line 393, in OpenGL_accelerate.arraydatatype.AsArrayTypedSizeChecked.__init__ (src/arraydatatype.c:7688)
AttributeError: 'module' object has no attribute 'sizeof'
Does anyone solve problems with link PyOpenGL+ numpy?
fixed that on my system by issuing:
sudo easy_install -U PyOpenGL
Noting:
using Ubuntu 12.04 LTS, with python2.7
did get a Permission denied error without that leading 'sudo'
via: http://matthew-4gl.wikispaces.com/python_modules ( in turn from https://bitbucket.org/ompl/ompl/issue/59/problem-with-ompl_apppy )
good luck

Categories

Resources