I am following the instructions in the textbook of the course 6.832, appendix A, on how to install Drake locally on Linux.
All the installation steps have completed and seems to be successful. In addition, I have installed all the prerequisites as described. However, when I run the test in section 2.3
(python -c 'import pydrake; print(pydrake.__file__)')
I have experienced several errors.
It seems that it is trying to access older version of several lib***.so files than what I have.
F.eks: Pydrake tried to include libgfortran.so.3, when I only have libgfortran.so.4 on my computer. I tried to do some "hackfixes" by using the ln -s command to make the terminal accept "libgfortran.so.4" as "libgfortran.so.3". But, now I ran into another error that I don't know how to solve.
It says:
Traceback (most recent call last): File "", line 1, in
File
"/opt/drake/lib/python2.7/site-packages/pydrake/init.py", line 32,
in from . import common File
"/opt/drake/lib/python2.7/site-packages/pydrake/common/init.py",
line 3, in from ._module_py import * ImportError:
/opt/drake/lib/python2.7/site-packages/pydrake/common/../../../../libdrake.so:
undefined symbol:
_ZN6google8protobuf2io17CodedOutputStream28WriteVarint32FallbackToArrayEjPh
How do I handle this problem?
If you followed section A.2.1 "download the binaries" verbatim, you would be downloading https://drake-packages.csail.mit.edu/drake/continuous/drake-latest-xenial.tar.gz, the package for Ubuntu 16.04 (Xenial), which links to libgfortran.so.3.
Since you are on Ubuntu 18.04 (Bionic), you would instead need to download https://drake-packages.csail.mit.edu/drake/continuous/drake-latest-bionic.tar.gz, which links to libgfortran.so.4.
Related
I just downloaded Spyder IDE for my programming class. I had been using Replit for two months, so I figured this is high time I switched to Spyder.
The console shows this message:
"This version of python seems to be incorrectly compiled
(internal generated filenames are not absolute).
This may make the debugger miss breakpoints.
Related bug: http://bugs.python.org/issue1666807"
NOTE: I had installed Python a year ago using Atom, but then today, before installing Spyder, I deleted Python and all files related to it. Then, I downloaded latest version of Python from Python's website (3.10.1).
I tried to find a work around for this by going to preferences, Python interpreter, and selecting the interpreter I downloaded, which is named Python IDLE. But, every time I try selecting that, it says invalid file path (/Applications/Python 3.10/IDL
I tried looking this up, but I cannot find something that is beginner-friendly. Can someone help me understand what is causing this?
I tried to add conda-forge as prioritized channel, and I created new environment to install python and spyder-kernel again.
conda config --add channels conda-forge
conda config --set channel_priority strict
conda install
https://conda-forge.org/#about
I was thinking about clear my default 'base' environment, but that does not work well. Thus, I had to create new environment.
conda create --name myenv
https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands
After that I have to indicate new Python Interpreter on 'Preferences - Python Interpreter - Use the following Python Interpreter'.
Then, it works for now, but I have to install additional packages for my convenience later.
In conclusion, I can have Spyder application running through Rosetta 2 with Python Interpreter for Apple Silicon.
Python 3.10.2 | packaged by conda-forge | (main, Jan 14 2022, 08:04:21) [Clang 11.1.0 ]
Type "copyright", "credits" or "license" for more information.
IPython 8.0.1 -- An enhanced Interactive Python.
My answer might be so rough, so please let me know how can I improve.
For some time now I am doing object detection on the GPU using tensorflow.
I have the following problem: I am forced to stick with version 2.3.0 because all versions after 2.3.0 fail with the following error:
Traceback (most recent call last):
File "src/main/python/roldetector/video_rol_detector.py", line 6, in <module>
import tensorflow as tf
File "/home/tensorflow/.local/lib/python3.6/site-packages/tensorflow/__init__.py", line 438, in <module>
_ll.load_library(_main_dir)
File "/home/tensorflow/.local/lib/python3.6/site-packages/tensorflow/python/framework/load_library.py", line 154, in load_library
py_tf.TF_LoadLibrary(lib)
tensorflow.python.framework.errors_impl.NotFoundError: /usr/local/lib/python3.6/dist-packages/tensorflow/core/kernels/libtfkernel_sobol_op.so: undefined symbol: _ZN10tensorflow8OpKernel11TraceStringEPNS_15OpKernelContextEb
I know there are more people having this problem but I have not seen a working solution yet.
The most remarkable - almost contradictory - is that docker is supposed to prevent this
kind of problem. I am working on ubuntu 20.04 but I should not need to specify that because if the docker image is correct then it should not matter what is running on the host for it to work. Right?
Does anyone have a working solution so I can start using the latest version of tensorflow? (All versions after 2.3.0 seem to suffer from the same problem)
Regards,
Chris
I'm on a Widows 7 machine. I reinstalled anaconda, made a new environment and then installed spyder 4.0 using conda. The Spyder 4 dialog box briefly opens and then crashes. Anaconda prompt says that it's a type error in the kite client. Below is the full output:
(spyder4) C:\>spyder
Traceback (most recent call last):
File "C:\Users\tb\AppData\Local\Continuum\anaconda3\envs\spyder4\lib\site
-packages\spyder\app\mainwindow.py", line 3711, in main
mainwindow = run_spyder(app, options, args)
File "C:\Users\tb\AppData\Local\Continuum\anaconda3\envs\spyder4\lib\site
-packages\spyder\app\mainwindow.py", line 3552, in run_spyder
main.setup()
File "C:\Users\tb\AppData\Local\Continuum\anaconda3\envs\spyder4\lib\site
-packages\spyder\app\mainwindow.py", line 960, in setup
self.completions.start()
File "C:\Users\tb\AppData\Local\Continuum\anaconda3\envs\spyder4\lib\site
-packages\spyder\plugins\completion\plugin.py", line 292, in start
client_info['plugin'].start()
File "C:\Users\tb\AppData\Local\Continuum\anaconda3\envs\spyder4\lib\site
-packages\spyder\plugins\completion\kite\plugin.py", line 144, in start
self.client.start()
File "C:\Users\tb\AppData\Local\Continuum\anaconda3\envs\spyder4\lib\site
-packages\spyder\plugins\completion\kite\client.py", line 62, in start
self.sig_client_started.emit(self.languages)
TypeError: KiteClient.sig_client_started[list].emit(): argument 1 has unexpected
type 'str'
I also tried using miniconda and the results were the same with the type error in the KiteClient.
When I tried conda update spyder=4.0.0 in the base environment Anaconda Prompt says there's package conflicts with jupyter and qtconsole and doesn't upgrade Spyder to the new version.
I also tried conda update anaconda inside the base environment and the results were the same as above with the type error in the KiteClient.
Does anyone know how I can get Spyder 4 installed or how I can troubleshoot it? Maybe remove Kite somehow. The new version of Spyder looks really sleek, I would love to use it.
I downloaded the bullet3 github repository (Bullet Physics SDK) from https://github.com/bulletphysics/bullet3.git which contains python bindings for OpenAI Gym examples to run Reinforcement Learning Algorithms.
I tried running the kuka_grasp_block_playback.py example present in the following directory: bullet3-master/examples/pybullet/examples/
My system does not support pybullet.GUI and so I went ahead with pybullet.DIRECT.
But, on running it using python kuka_grasp_block_playback.py, its giving me the following error:
Traceback (most recent call last):
File "kuka_grasp_block_playback.py", line 92, in <module>
stepIndex = int(p.readUserDebugParameter(stepIndexId))
pybullet.error: Failed to read parameter.
How to deal with this ?
This is an out-of-date question, but just in case:. the latest version of pybullet contains a similar KUKA grasping implementation as OpenAI Gym environment. Just run 'sudo pip install pybullet' to get it.
This gym environment can be run without GUI without issue. See the quickstart guide at http://pybullet.org for more info about those pybullet Gym environments for Deep Reinforcement Learning.
The readUserDebugParameter only executes when using GUI mode, it fails in DIRECT mode, so just comment it out.
I want to setup an oauth library for Python on my windows desktop. I am newbie and this is my second day on Python and I having a tonne of trouble.
I downloaded the python-oauth2 (hudson-python-oauth2-167.zip) from github. I have extracted this to my python32 folder. When I run the setup command "python setup.py", I first got a syntax error on the print statement. I assumed it is because I am running on windows and so I changed it and then ran the setup.
I then got the following error:
Traceback (most recent call last):
File "C:\Python32\simplegeo-python-oauth2-1920657\setup.py", line 2, in
from setuptools import setup, find_packages
ImportError: No module named setuptools
Can someone guide me with setting up python-oauth2? Am I missing something basic here?
You need to install Distribute, which is a fork of setuptools that supports Python 3.
That said, your syntax error was because python-oauth2 doesn't seem to run on Python 3 yet, so you need to either help port it, or use Python 2.7.