Dear all,
I am using the anaconda tool on my machine (Macintosh.)
When I try to do : from poppy.creatures import PoppyHumanoid
I got an error telling me that Poppy is not known
I got the same error is I use normal Python scripts:
[0 sribas@sribas ~]% /usr/bin/python
Python 2.7.2 (default, Oct 11 2012, 20:14:37)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type âhelpâ, âcopyrightâ, âcreditsâ or âlicenseâ for more information.
from poppy.creatures import PoppyHumanoid
Traceback (most recent call last):
File ââ, line 1, in
ImportError: No module named poppy.creatures
I guess this error is known and I should just look at some documents Can you point me to the right ones ?
sorry !!!
In fact, it used to work fine until I installed ANACONDA env. for a personal training
since then I have an python 3.5 installed, and nothing under sites-packages.
I think I should either install everything back on ANACONDA or remove anacondaâŚ
I tried to install pypot under the anaconda environment. I know that Anaconda is python 3.5 ⌠but I tried anyway. I got now the following error :
[0 sribas@sribas ~/Documents/workspace/pypot]% python
Python 3.5.0 |Anaconda 2.4.0 (x86_64)| (default, Oct 20 2015, 14:39:26)
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type âhelpâ, âcopyrightâ, âcreditsâ or âlicenseâ for more information.
from poppy.creatures import PoppyHumanoid
Traceback (most recent call last):
File ââ, line 1, in
File â//anaconda/lib/python3.5/site-packages/poppy/creatures/init.pyâ, line 4, in
from .abstractcreature import AbstractPoppyCreature
File â//anaconda/lib/python3.5/site-packages/poppy/creatures/abstractcreature.pyâ, line 7, in
from pypot.robot import Robot, from_json, use_dummy_robot
File â/Users/sribas/Documents/workspace/pypot/pypot/robot/init.pyâ, line 1, in
from .robot import Robot
File â/Users/sribas/Documents/workspace/pypot/pypot/robot/robot.pyâ, line 5, in
from âŚdynamixel.controller import BaseDxlController
File â/Users/sribas/Documents/workspace/pypot/pypot/dynamixel/init.pyâ, line 4, in
from .io import DxlIO, DxlError
File â/Users/sribas/Documents/workspace/pypot/pypot/dynamixel/io.pyâ, line 34, in
class DxlIO(object):
File â/Users/sribas/Documents/workspace/pypot/pypot/dynamixel/io.pyâ, line 219, in DxlIO
def scan(self, ids=xrange(254)):
NameError: name âxrangeâ is not defined
Either I remove Anaconda to go back to my normal python installation, either I try to correct the error⌠humâŚ
Add-on: I have removed the anaconda environment everything is borken now I canât launch my python console anymore of course, itâs normal, I should change my bash script. Anyhow, I found that I could install anaconda with python 2.7 inside⌠hey hey ! I am trying right now. I keep you inform.
The error is here [0 sribas@sribas ~/Documents/workspace/pypot]% python
You didnât install pypot, you just tried to execute it from its folder. pypot use the module 2to3 to adapt the code for python3. If you donât install it with the setup.py (python setup.py install) it wonât works in python 3.
"[0 sribas@sribas ~/Documents/workspace/pypot]%"
arrf, this line should not have been copied into the post. This folder was for me to test some github / sourcetree application
I did the "python setup⌠" but my issue is that I broke my link to python 2.7 (I have 3.5 also).
Anyhow, I am going to reinstall everything as very well mentionned in the doc of pypot (not joking ! ) I am following the doc ! I keep you inform (between some Mario Galaxy parties with my wife !).
The error message âxrangeâ is not defined would seem to indicate that you are trying to run a Python 2 codebase with Python 3 . In Python 2, an iterable object is often created with xrange() method , usually in a âfor loopâ, which behaves very similarly to a generator. In Python 3, range() method is implemented the same as the xrange() method , so there is no dedicated xrange(). So, if you use xrange() in Python 3, it will generate NameError:name âxrangeâ is not defined error.