mpc.pytorch icon indicating copy to clipboard operation
mpc.pytorch copied to clipboard

pip vs setup.py install on ARMv8

Open juanmed opened this issue 4 years ago • 2 comments

Hi,

I was trying to run your scripts on a Jetson Nano, which has an ARMv8 cpu and runs Ubuntu 18.04LTS, so all the following relates to this platform only. I found that it will work in this platform only when installing under python3 and using pip install mpc. If installation is done using python setup.py install under python3 the installation does not work, and both pip install mpc and python setup.py install do not work under python2.7. The error found is always with importing mpc:

Traceback (most recent call last):
  File "examples/MassSpringDamper_Example.py", line 41, in <module>
    from mpc import mpc
  File "build/bdist.linux-aarch64/egg/mpc/mpc.py", line 17, in <module>
  File "build/bdist.linux-aarch64/egg/mpc/lqr_step.py", line 13, in <module>
ImportError: cannot import name mpc

However, even using python3 and pip install mpc, the scripts are unable to locate the mpc/env_dx folder, presumably because it is only available when cloning your github repo and installing using setup.py. In order to make it work one has to move files in env_dx folder to the appropriate location in order for python to find them.

I was wondering if you have found this issue before and how did you solve it, or any pointers on a solution. This does not happen in my desktop (Intel Core i5, Ubuntu16.04).

Thanks!

juanmed avatar Sep 09 '19 11:09 juanmed

I've not run into this before but do let me know if you find an easy fix I should put back into the repo

On Sep 9, 2019, at 7:50 AM, Juan [email protected] wrote:

Hi,

I was trying to run your scripts on a Jetson Nano, which has an ARMv8 cpu and runs Ubuntu 18.04LTS, so all the following relates to this platform only. I found that it will work in this platform only when installing under python3 and using pip install mpc. If installation is done using python setup.py install under python3 the installation does not work, and both pip install mpc and python setup.py install do not work under python2.7. The error found is always with importing mpc:

Traceback (most recent call last): File "examples/MassSpringDamper_Example.py", line 41, in from mpc import mpc File "build/bdist.linux-aarch64/egg/mpc/mpc.py", line 17, in File "build/bdist.linux-aarch64/egg/mpc/lqr_step.py", line 13, in ImportError: cannot import name mpc However, even using python3 and pip install mpc, the scripts are unable to locate the mpc/env_dx folder, presumably because it is only available when cloning your github repo and installing using setup.py. In order to make it work one has to move files in env_dx folder to the appropriate location in order for python to find them.

I was wondering if you have found this issue before and how did you solve it, or any pointers on a solution. This does not happen in my desktop (Intel Core i5, Ubuntu16.04).

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

bamos avatar Sep 09 '19 13:09 bamos

is there a solution to this? I believe I am having a similar issue but in my case, it shows the following error when trying to run the control.py code

TypeError: init() got multiple values for argument 'u_lower'

btw I am running in jetson xavier. TIA

ashsifat avatar Sep 04 '20 08:09 ashsifat