dronekit install error: instructions are not working - dronekit-python

I followed the instructions to install dronekit-python as described in the Getting Started page.
I ran the following command:
pip install dronekit
and I got a message:
Cold notfind a version that satisfies the requirements dronekit (from
versions: 2.0.0b2 .... 2.0.0rc9)
I did as scaredrone has prescribed two days ago:
pip install dronekit=2.0.0rc4
and I got the exception:
Exception:
Traceback (most recent call last):
File "C:\WinPython-64bit-2.7.6.4\python-2.7.6.amd64\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\WinPython-64bit-2.7.6.4\python-2.7.6.amd64\lib\site-packages\pip\commands\install.py", line 257, in run
InstallRequirement.from_line(name, None))
File "C:\WinPython-64bit-2.7.6.4\python-2.7.6.amd64\lib\site-packages\pip\req.py", line 172, in from_line
return cls(req, comes_from, url=url, prereleases=prereleases)
File "C:\WinPython-64bit-2.7.6.4\python-2.7.6.amd64\lib\site-packages\pip\req.py", line 70, in __init__
req = pkg_resources.Requirement.parse(req)
File "C:\WinPython-64bit-2.7.6.4\python-2.7.6.amd64\lib\site-packages\pip\_vendor\pkg_resources.py", line 2606, in parse
reqs = list(parse_requirements(s))
File "C:\WinPython-64bit-2.7.6.4\python-2.7.6.amd64\lib\site-packages\pip\_vendor\pkg_resources.py", line 2544, in parse_requirements
line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
File "C:\WinPython-64bit-2.7.6.4\python-2.7.6.amd64\lib\site-packages\pip\_vendor\pkg_resources.py", line 2512, in scan_list
raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in', 'dronekit=2.0.0rc4', 'at', '=2.0.0rc4')

I had the same problem. Try to run
sudo pip install --pre dronekit
the --pre flag enables installation of pre-release software.
Don't know why it hasn't been documented.
Answer from here: https://discuss.dronekit.io/t/pip-install-dronekit-fails-on-odroid-xu4-unless-pre-is-used/93

Related

google-cloud-pubsub installation fails in coral developer board

Environment details:
Python 3.7.3
setuptools==51.0.0
I am just trying to install google-cloud-pubsub in coral developer board using the command,
pip install --upgrade --no-cache google-cloud-pubsub
When running the above command, it started installing the dependencies then after it goes for some grpcio build process as shown below.
Build log:
Building wheels for collected packages: grpc-google-iam-v1, grpcio
Building wheel for grpc-google-iam-v1 (setup.py) ... done
Created wheel for grpc-google-iam-v1: filename=grpc_google_iam_v1-0.12.3-py3-none-any.whl size=18501 sha256=2be51c55f5cab3ff97efdb39e3a6be07e5c2d030ca0a47a8358a8fa1efef58b6
Stored in directory: /tmp/pip-ephem-wheel-cache-rpj8jh5r/wheels/b9/ee/67/2e444183030cb8d31ce8b34cee34a7afdbd3ba5959ea846380
Building wheel for grpcio (setup.py) ... error
This process hangs for several minutes and got the error logs shown below printed.
Error:
Building wheel for grpcio (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/mendel/.virtualenvs/cv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1pbjozx4/grpcio_3a1c8f81c7024b04bd7534fe601796ee/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1pbjozx4/grpcio_3a1c8f81c7024b04bd7534fe601796ee/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-1u5g0n_z
cwd: /tmp/pip-install-1pbjozx4/grpcio_3a1c8f81c7024b04bd7534fe601796ee/
Complete output (1234 lines):
ASM Builds for BoringSSL currently not supported on: linux-aarch64
Found cython-generated files...
running bdist_wheel
......................
lot of lines there ...!
......................
Traceback (most recent call last):
File "/tmp/pip-install-1pbjozx4/grpcio_3a1c8f81c7024b04bd7534fe601796ee/src/python/grpcio/commands.py", line 267, in build_extensions
build_ext.build_ext.build_extensions(self)
File "/usr/lib/python3.7/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/usr/lib/python3.7/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/home/mendel/.virtualenvs/cv/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 196, in build_extension
_build_ext.build_extension(self, ext)
File "/usr/lib/python3.7/distutils/command/build_ext.py", line 534, in build_extension
depends=ext.depends)
File "/tmp/pip-install-1pbjozx4/grpcio_3a1c8f81c7024b04bd7534fe601796ee/src/python/grpcio/_parallel_compile_patch.py", line 59, in _parallel_compile
_compile_single_file, objects)
File "/usr/lib/python3.7/multiprocessing/pool.py", line 268, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/usr/lib/python3.7/multiprocessing/pool.py", line 657, in get
raise self._value
File "/usr/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/usr/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "/tmp/pip-install-1pbjozx4/grpcio_3a1c8f81c7024b04bd7534fe601796ee/src/python/grpcio/_parallel_compile_patch.py", line 54, in _compile_single_file
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/usr/lib/python3.7/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command 'aarch64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for grpcio
Running setup.py clean for grpcio
Note: I have successfully installed google-cloud-storage==1.33.0

How to use Cython on Windows 10 with python 3.8

I want to know how correctly convert py documents to C with help Cython
But all the time a have some error.
D:\Cython\test4>python setup.py build_ext --inplace
running build_ext
Traceback (most recent call last):
File "setup.py", line 4, in <module>
setup(ext_modules = cythonize('hello.pyx', compiler_directives={'language_level': 3}))
File "C:\Users\Alexandr\AppData\Local\Programs\Python\Python38\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Alexandr\AppData\Local\Programs\Python\Python38\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\Alexandr\AppData\Local\Programs\Python\Python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Alexandr\AppData\Local\Programs\Python\Python38\lib\distutils\command\build_ext.py", line 306, in run
self.compiler = new_compiler(compiler=self.compiler,
File "C:\Users\Alexandr\AppData\Local\Programs\Python\Python38\lib\distutils\ccompiler.py", line 1032, in new_compiler
return klass(None, dry_run, force)
File "C:\Users\Alexandr\AppData\Local\Programs\Python\Python38\lib\distutils\cygwinccompiler.py", line 282, in __init__
CygwinCCompiler.__init__ (self, verbose, dry_run, force)
File "C:\Users\Alexandr\AppData\Local\Programs\Python\Python38\lib\distutils\cygwinccompiler.py", line 157, in __init__
self.dll_libraries = get_msvcr()
File "C:\Users\Alexandr\AppData\Local\Programs\Python\Python38\lib\distutils\cygwinccompiler.py", line 86, in get_msvcr
raise ValueError("Unknown MS Compiler version %s " % msc_ver)
ValueError: Unknown MS Compiler version 1916
I have hello.pyx file, which includes this code
cpdef int test(int x):
cdef int y = 1
cdef int i
for i in range(1, x+1):
y *= i
return y
Setup.py file includes
from distutils.core import setup
from Cython.Build import cythonize
setup(ext_modules = cythonize('hello.pyx', compiler_directives={'language_level': 3}))
Microsoft Visual Studio has installed, gcc compiler also installed. What should I do?
Hey I found simple solution. Just install Microsfot Visual Studio (community version works). Make sure you got MSVC and Windows 10 SDK checked. I was told both are required.
Select Desktop C++ development:
Select MSVC and Win10 SDK:
After install restart pc. It should compile with python setup.py build_ext --incplace

chromium embedded framework CEF3 cross-compile for arm

Can anyone share a complete list of steps to be performed in order to cross compile CEF3 for ARM?
I am working on host = ubuntu 14.04 and I would like to cross compile for odroid board.
This is the list of steps I performed:
>git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
>export PATH=`pwd`/depot_tools:"$PATH"
>mkdir CEF3_odroid
>cd CEF3_odroid
>mkdir chromium
>cd chromium
>fetch --nohooks chromium --nosvn=True
>#I found the following revision reading CHROMIUM_BUILD_COMPATIBILITY.txt from https://bitbucket.org/chromiumembedded/cef/src
>gclient sync --revision 14bd12d63019fbdd6f9d6c16b986a5f64a21264b --jobs 16
>cd src
>git clone https://bitbucket.org/chromiumembedded/cef.git
>sudo apt-get install gcc-arm-linux-gnueabihf
>sudo apt-get install g++-4.8-multilib-arm-linux-gnueabihf
>./build/install-build-deps.sh --arm
>cd cef
>export GYP_GENERATORS='ninja'
>export GYP_CROSSCOMPILE=1
>export GYP_DEFINES='target_arch=arm arm_float_abi=hard component=shared_library linux_use_gold_flags=1'
>./cef_create_projects.sh
And I got the following error: gyp: Call to 'python cups_config_helper.py --libs /media/varesio/disco2/GEF/CEF3_odroid/chromium/src/chrome/installer/linux/debian_wheezy_arm-sysroot' returned exit status 1. Traceback (most recent call last): File "tools/gclient_hook.py", line 106, in RunAction(cef_dir, gyper) File "/media/varesio/disco2/GEF/CEF3_odroid/chromium/src/cef/tools/gclient_util.py", line 39, in RunAction command, cwd=dir, always=True) File "/media/varesio/disco2/GEF/CEF3_Linux/depot_tools/gclient_utils.py", line 293, in CheckCallAndFilterAndHeader return CheckCallAndFilter(args, **kwargs) File "/media/varesio/disco2/GEF/CEF3_Linux/depot_tools/gclient_utils.py", line 538, in CheckCallAndFilter rv, args, kwargs.get('cwd', None), None, None) subprocess2.CalledProcessError: Command '/usr/bin/python ../build/gyp_chromium cef.gyp -I cef.gypi' returned non-zero exit status 1 in /media/varesio/disco2/GEF/CEF3_odroid/chromium/src/cef
Thanks Andrea
I've had same problem. Resolved by adding use_cups=0 to GYP_DEFINES env.

Nose GAE : Cannot import dev_appserver, but app engine is still in PYTHONPATH

I am getting the following error when trying to run the nosetest from my GAE project:
nosetests --nologcapture --with-gae --without-sandbox --gae-lib-root=/Users/dsinha/Dropbox/code/google-cloud-sdk/platform/google_appengine
but I get the following error:
Traceback (most recent call last):
File "/usr/local/bin/nosetests", line 8, in <module>
load_entry_point('nose==1.3.4', 'console_scripts', 'nosetests')()
File "/Library/Python/2.7/site-packages/nose/core.py", line 121, in __init__
**extra_args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/main.py", line 94, in __init__
self.parseArgs(argv)
File "/Library/Python/2.7/site-packages/nose/core.py", line 145, in parseArgs
self.config.configure(argv, doc=self.usage())
File "/Library/Python/2.7/site-packages/nose/config.py", line 346, in configure
self.plugins.configure(options, self)
File "/Library/Python/2.7/site-packages/nose/plugins/manager.py", line 284, in configure
cfg(options, config)
File "/Library/Python/2.7/site-packages/nose/plugins/manager.py", line 99, in __call__
return self.call(*arg, **kw)
File "/Library/Python/2.7/site-packages/nose/plugins/manager.py", line 167, in simple
result = meth(*arg, **kw)
File "/Library/Python/2.7/site-packages/nosegae.py", line 87, in configure
from google.appengine.tools import old_dev_appserver as dev_appserver
ImportError: cannot import name old_dev_appserver
The sys.path reads:
'/Users/dsinha/Downloads/eclipse/plugins/org.python.pydev_3.9.0.201411111611/pysrc', '/Users/dsinha/Dropbox/code/google-cloud-sdk/platform/google_appengine/lib/antlr3', '/Users/dsinha/Dropbox/code/google-cloud-sdk/platform/google_appengine/lib/fancy_urllib', '/Users/dsinha/Dropbox/code/google-cloud-sdk/platform/google_appengine/lib/ipaddr', '/Users/dsinha/Dropbox/code/google-cloud-sdk/platform/google_appengine/lib/yaml-3.10', '/Users/dsinha/Dropbox/code/google-cloud-sdk/platform/google_appengine/lib/rsa', '/Users/dsinha/Dropbox/code/google-cloud-sdk/platform/google_appengine/lib/pyasn1', '/Users/dsinha/Dropbox/code/google-cloud-sdk/platform/google_appengine/lib/pyasn1_modules', '/Users/dsinha/Dropbox/code/google-cloud-sdk/platform/google_appengine', '/Users/dsinha/Dropbox/code/google-cloud-sdk/platform/google_appengine/lib/simplejson', '/Users/dsinha/Dropbox/code/google-cloud-sdk/platform/google_appengine/lib/django-1.4', '/Users/dsinha/Dropbox/code/google-cloud-sdk/platform/goo...
so the app engine libraries should be getting pulled in. Actually its first failing to pull in dev_appserver, and then trying and failing to pull old_dev_appserver
The dir inside the appengine/lib file is:
bash-3.2$ ls
__init__.py appcfg.py backends_xml_parser.py dispatch_xml_parser.py handler_generator.py php_cli.py value_mixin.pyc
__init__.pyc appcfg_java.py boolean_action.py docker handler_generator.pyc queue_xml_parser.py web_xml_parser.py
adaptive_thread_pool.py appengine_rpc.py boolean_action.pyc dos_xml_parser.py jarfile.py queue_xml_parser.pyc web_xml_parser.pyc
api_server.py appengine_rpc.pyc bulkload_client.py download_appstats.py java_quickstart.py remote_api_shell.py xml_parser_utils.py
app_engine_config_exception.py appengine_rpc_httplib2.py bulkloader.py endpointscfg.py java_quickstart.pyc requeue.py xml_parser_utils.pyc
app_engine_config_exception.pyc augment_mimetypes.py cron_xml_parser.py gen_protorpc.py java_utils.py sdk_update_checker.py yaml_translator.py
app_engine_web_xml_parser.py augment_mimetypes.pyc dev-channel-js.js handler.py java_utils.pyc sdk_update_checker.pyc yaml_translator.pyc
app_engine_web_xml_parser.pyc backends_conversion.py devappserver2 handler.pyc os_compat.py value_mixin.py
bash-3.2$ pwd
/Users/dsinha/Dropbox/code/google-cloud-sdk/platform/google_appengine/google/appengine/tools
I also tried to find the modules available inside the google.appengine.tools package:
>>> import pkgutil
>>> [name for _, name, _ in pkgutil.iter_modules(['testpkg'])]
[]
This problem started occuring after I upgraded to App Engine 1.9.10 (to use the async search features). In a problem that I think is related, when I try to run the debug server from PyDev, it just silently terminated on any page request (localhost:8080).
Running dev_appserver . from the command line works fine though.
Nose-GAE broke with App Engine 1.9.17: https://github.com/Trii/NoseGAE/issues/6
Downgrading to 1.9.15 made the problem go away temporarily while waiting for the issue to be resolved by nose-gae

Exception in idle (python 2.7) - possible bug in idle?

I'm trying to run a meta-analysis on a database of fMRI data, using the neurosynth python library through idle. When I try to run even some of the most basic functions, I get an error, not an error my own code, or in the neurosynth modules, the error seems to be a bug in idle itself.
I uninstalled and reinstalled python 2.7, reinstalled neurosynth and its dependencies, and ran into the same error. I've pasted my code below, followed by the error message, which appears in the unix shell (not in the idle shell).
Has anybody come across this error before using idle and python 2.7?
The script:
from neurosynth.base.dataset import Dataset
from neurosynth.analysis import meta, decode, network
import neurosynth
neurosynth.set_logging_level('info')
dataset = Dataset('data/database.txt')
dataset.add_features('data/features.txt')
dataset.save('dataset.pkl')
print 'done'
The error message which appeared in the unix shell:
----------------------------------------
Unhandled server exception!
Thread: SockThread
Client Address: ('127.0.0.1', 46779)
Request: <socket._socketobject object at 0xcb8d7c0>
Traceback (most recent call last):
File "/usr/global/python/2.7.3/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/global/python/2.7.3/lib/python2.7/SocketServer.py", line 310, in process_request
self.finish_request(request, client_address)
File "/usr/global/python/2.7.3/lib/python2.7/SocketServer.py", line 323, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/global/python/2.7.3/lib/python2.7/idlelib/rpc.py", line 503, in __init__
SocketServer.BaseRequestHandler.__init__(self, sock, addr, svr)
File "/usr/global/python/2.7.3/lib/python2.7/SocketServer.py", line 638, in __init__
self.handle()
File "/usr/global/python/2.7.3/lib/python2.7/idlelib/run.py", line 265, in handle
rpc.RPCHandler.getresponse(self, myseq=None, wait=0.05)
File "/usr/global/python/2.7.3/lib/python2.7/idlelib/rpc.py", line 280, in getresponse
response = self._getresponse(myseq, wait)
File "/usr/global/python/2.7.3/lib/python2.7/idlelib/rpc.py", line 300, in _getresponse
response = self.pollresponse(myseq, wait)
File "/usr/global/python/2.7.3/lib/python2.7/idlelib/rpc.py", line 424, in pollresponse
message = self.pollmessage(wait)
File "/usr/global/python/2.7.3/lib/python2.7/idlelib/rpc.py", line 376, in pollmessage
packet = self.pollpacket(wait)
File "/usr/global/python/2.7.3/lib/python2.7/idlelib/rpc.py", line 347, in pollpacket
r, w, x = select.select([self.sock.fileno()], [], [], wait)
error: (4, 'Interrupted system call')
*** Unrecoverable, server exiting!
----------------------------------------
Thanks in advance!
Idle is meant for interactive exploration in the shell, for editing in an editor, and for testing programs by running them from an editor. It is not meant for production running of programs once developed. If there is a problem, one should separate the Idle part from the running with Python part. So in the unix shell, run python -m idlelib (for instance) to see if Idle starts correctly. Then, in an appropriate directory, run python path-to-my-file.py. Which does not work?
The error message is definitely odd, as it has more than just the python traceback. On the other hand, it does not start with a line of your code. I have no idea why the select call would be interrupted.

Resources