Git Product home page Git Product logo

Comments (14)

julianoes avatar julianoes commented on July 19, 2024 2

By default I don't have dcsdkgen in my path and I always need to do:

export PATH=$PATH:$HOME/.local/bin
which dcsdkgen
~/.local/bin/dcsdkgen

from mavsdk-python.

julianoes avatar julianoes commented on July 19, 2024 2

Thanks for the feedback @IeiuniumLux.

@JonasVautherin I think we should add that to the docs.

from mavsdk-python.

julianoes avatar julianoes commented on July 19, 2024 1

I don't install it system wide, I install it as a user, and that path is not added by default.

from mavsdk-python.

JonasVautherin avatar JonasVautherin commented on July 19, 2024

Did you install the prerequisites before running ./other/tools/run_protoc.sh?

I just ran the following successfully on my computer:

cd /tmp
git clone https://github.com/dronecode/dronecodesdk-python --recursive
cd dronecodesdk-python
pip3 install -r requirements.txt -r requirements-dev.txt
./other/tools/run_protoc.sh

from mavsdk-python.

IeiuniumLux avatar IeiuniumLux commented on July 19, 2024

@JonasVautherin, thank you for creating this a new issue. Yes, I ran successfully all those steps, except for the last one (./other/tools/run_protoc.sh). I'm using Python 3.6.8 and pip 18.1. In the instructions, it's not clear if DronecodeSDK-Python needs to be cloned underneath the DronecodeSDK repo or parallel to it. I did both, and run_protoc.sh still fails.

git clone https://github.com/dronecode/dronecodesdk-python --recursive
cd dronecodesdk-python
pip3 install -r requirements.txt -r requirements-dev.txt

screen shot 2019-03-08 at 9 36 22 am

from mavsdk-python.

JonasVautherin avatar JonasVautherin commented on July 19, 2024

In the instructions, it's not clear if DronecodeSDK-Python needs to be cloned underneath the DronecodeSDK repo or parallel to it.

It is a separate repo, and should be treated as such. Otherwise I guess it would either be part of DronecodeSDK, or at least a submodule :-). Just clone them separately, that's better 👍.

From your screenshot, I see that jmavsim is running, the backend succeeded in discovering it, and the python module is not there (obviously, because run_protoc.sh failed).

I did both, and run_protoc.sh still fails.

Do you always get exactly the same message as you pasted above? Did pip install run successfully?

from mavsdk-python.

IeiuniumLux avatar IeiuniumLux commented on July 19, 2024

Do you always get exactly the same message as you pasted above? Did pip install run successfully?

Yes, I do always get exactly the same message and 'pip install' ran successfully without reporting any issues. I tried to run 'python -m grpc_tools.protoc' from the prompt, but it fails since files were not generated by run_protoc.sh

screen shot 2019-03-08 at 10 40 23 am

One extra note, I'm not running DronecodeSDK out of master. Instead, I checked out v0.14.2 (git checkout v0.14.2).

from mavsdk-python.

JonasVautherin avatar JonasVautherin commented on July 19, 2024

It's a good idea to checkout the latest release v0.14.2 instead of master 👍.

I tried to run 'python -m grpc_tools.protoc' from the prompt, but it fails since files were not generated by run_protoc.sh

So this runs protoc, which requires some arguments (including input files). So this error message is normal (you could run e.g. python3 -m grpc_tools.protoc -h).

The error message says:

: program not found or is not executable

I am wondering if $(which dcsdkgen) just does not find our plugin (dcsdkgen, in proto/pb_plugins), and results in "", which then gets executed by protoc. So the error message says that "" is not executable, which makes sense. And dcsdkgen is supposed to be installed by run_protoc.sh (here).

What do you think?

from mavsdk-python.

IeiuniumLux avatar IeiuniumLux commented on July 19, 2024

dcsdkgen was indeed installed:
Screen Shot 2019-03-08 at 2 45 37 PM

from mavsdk-python.

JonasVautherin avatar JonasVautherin commented on July 19, 2024

dcsdkgen was indeed installed:

This doesn't mean it was installed. It means that the submodule is there. I guess which dcsdkgen says something like dcsdkgen not found, doesn't it?

Are you installing stuff on the system or in a venv? If installing on the system, you could try the following:

cd proto/pb_plugins
pip install -r requirements.txt
pip install -e .
which dcsdkgen

from mavsdk-python.

IeiuniumLux avatar IeiuniumLux commented on July 19, 2024

you could try the following:

cd proto/pb_plugins
pip install -r requirements.txt
pip install -e .
which dcsdkgen

I'm installing on the system, outputs below:

[abencomo: pb_plugins]$ pip install -r requirements.txt

Requirement already satisfied: protobuf in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from -r requirements.txt (line 1)) (3.7.0)
Requirement already satisfied: jinja2 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from -r requirements.txt (line 2)) (2.10)
Requirement already satisfied: setuptools in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from protobuf->-r requirements.txt (line 1)) (40.8.0)
Requirement already satisfied: six>=1.9 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from protobuf->-r requirements.txt (line 1)) (1.12.0)
Requirement already satisfied: MarkupSafe>=0.23 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from jinja2->-r requirements.txt (line 2)) (1.1.0)

pip install -e .

Obtaining file:///Users/abencomo/git/DronecodeSDK/DronecodeSDK-Python/proto/pb_plugins
Requirement already satisfied: protobuf in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from dcsdkgen==0.1a0) (3.7.0)
Requirement already satisfied: jinja2 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from dcsdkgen==0.1a0) (2.10)
Requirement already satisfied: six>=1.9 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from protobuf->dcsdkgen==0.1a0) (1.12.0)
Requirement already satisfied: setuptools in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from protobuf->dcsdkgen==0.1a0) (40.8.0)
Requirement already satisfied: MarkupSafe>=0.23 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from jinja2->dcsdkgen==0.1a0) (1.1.0)
Installing collected packages: dcsdkgen
  Found existing installation: dcsdkgen 0.1a0
    Uninstalling dcsdkgen-0.1a0:
      Successfully uninstalled dcsdkgen-0.1a0
  Running setup.py develop for dcsdkgen
Successfully installed dcsdkgen

[abencomo: pb_plugins]$ which dcsdkgen

nothing when I enter 'which dcsdkgen'

from mavsdk-python.

JonasVautherin avatar JonasVautherin commented on July 19, 2024

Hmm. And can you find it on your system somewhere? You are on the master branch of DronecodeSDK-Python, right?

Maybe you could also try to install it in a venv instead of the system?

from mavsdk-python.

IeiuniumLux avatar IeiuniumLux commented on July 19, 2024

By default I don't have dcsdkgen in my path and I always need to do:

export PATH=$PATH:$HOME/.local/bin

That did it. Thanks @julianoes
@JonasVautherin, feel free to close this issue and thank you.

DronecodeSDK-1

Requirement already satisfied: protobuf in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from dcsdkgen==0.1a0) (3.7.0)
Requirement already satisfied: jinja2 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from dcsdkgen==0.1a0) (2.10)
Requirement already satisfied: setuptools in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from protobuf->dcsdkgen==0.1a0) (40.8.0)
Requirement already satisfied: six>=1.9 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from protobuf->dcsdkgen==0.1a0) (1.12.0)
Requirement already satisfied: MarkupSafe>=0.23 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from jinja2->dcsdkgen==0.1a0) (1.1.0)
Installing collected packages: dcsdkgen
  Running setup.py install for dcsdkgen ... done
Successfully installed dcsdkgen-0.1a0
[+] Done
[+] Generating plugins from 
 -> [+] Generated protobuf and gRPC bindings for action
 -> [+] Generated plugin for action
 -> [+] Generated protobuf and gRPC bindings for calibration
 -> [+] Generated plugin for calibration
 -> [+] Generated protobuf and gRPC bindings for camera
 -> [+] Generated plugin for camera
 -> [+] Generated protobuf and gRPC bindings for core
 -> [+] Generated plugin for core
 -> [+] Generated protobuf and gRPC bindings for discovery
 -> [+] Generated plugin for discovery
 -> [+] Generated protobuf and gRPC bindings for gimbal
 -> [+] Generated plugin for gimbal
 -> [+] Generated protobuf and gRPC bindings for info
 -> [+] Generated plugin for info
 -> [+] Generated protobuf and gRPC bindings for mission
 -> [+] Generated plugin for mission
 -> [+] Generated protobuf and gRPC bindings for telemetry
 -> [+] Generated plugin for telemetry
[+] Done

from mavsdk-python.

JonasVautherin avatar JonasVautherin commented on July 19, 2024

@julianoes: Thanks a lot!

So installing a python package system-wide doesn't put it in the PATH? What's the point of installing it on the system then?

from mavsdk-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.