I have a simple main app which on start calls the gps functionality of plyer and then gets the location from the android phone and then recentres my map to that location. The code looks something like this
main.py
from kivy.app import App
from mapcode import MapCode
from plyer import gps
class MainApp(App):
def on_start(self):
gps.configure(on_location=self.on_gps_location)
gps.start()
def on_gps_location(self, **kwargs):
print(kwargs)
latitude = kwargs['lat']
longitude = kwargs['lon']
map = MapCode()
map.recentremap(latitude, longitude)
gps.stop()
MainApp().run()
main.kv
#:include mapcode.kv
BoxLayout:
orientation: 'vertical'
MapCode:
id: MapCode
mapcode.py
from kivy_garden.mapview import MapView
from kivy.app import App
from kivy_garden.mapview import MapMarkerPopup
class MapCode(MapView):
def recentremap(self, lat, lon):
print("in recentre")
app = App.get_running_app()
print(app)
app.root.ids.MapCode.center_on(lat, lon)
mapcode.kv
#:import MapView kivy_garden.mapview
<MapCode>:
lat: 18.5204
lon: 73.8567
zoom: 13
on_zoom:
self.zoom = 13 if self.zoom < 13 else self.zoom
double_tap_zoom: True
on_lat:
lat = 18.5204
on_lon:
lon = 73.8567
MapMarkerPopup:
id:MapMarkerPopup
lat:18.5204
lon:73.8567
When I deploy this app on my phone, the app crashes by giving the following error:
Traceback (most recent call last):
11-26 00:53:42.843 3852 3933 I python : File "/home/kaushik/PycharmProjects/Tesekkurler/.buildozer/android/app/main.py", line 20, in <module>
11-26 00:53:42.844 3852 3852 I python : Traceback (most recent call last):
11-26 00:53:42.844 3852 3852 I python : File "jnius/jnius_proxy.pxi", line 50, in jnius.jnius.PythonJavaClass.invoke
11-26 00:53:42.844 3852 3852 I python : File "jnius/jnius_proxy.pxi", line 76, in jnius.jnius.PythonJavaClass._invoke
11-26 00:53:42.845 3852 3852 I python : File "/home/kaushik/PycharmProjects/Tesekkurler/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/tesekkurlerapp/arm64-v8a/plyer/platforms/android/gps.py", line 36, in onLocationChangedList
11-26 00:53:42.845 3852 3852 I python : File "/home/kaushik/PycharmProjects/Tesekkurler/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/tesekkurlerapp/arm64-v8a/plyer/platforms/android/gps.py", line 24, in onLocationChanged
11-26 00:53:42.845 3852 3852 I python : File "/home/kaushik/PycharmProjects/Tesekkurler/.buildozer/android/app/main.py", line 16, in on_gps_location
11-26 00:53:42.845 3852 3852 I python : File "/home/kaushik/PycharmProjects/Tesekkurler/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/tesekkurlerapp/arm64-v8a/kivy_garden/mapview/view.py", line 545, in __init__
11-26 00:53:42.845 3852 3852 I python : File "kivy/graphics/instructions.pyx", line 608, in kivy.graphics.instructions.Canvas.__init__
11-26 00:53:42.845 3852 3852 I python : File "kivy/graphics/instructions.pyx", line 154, in kivy.graphics.instructions.InstructionGroup.__init__
11-26 00:53:42.846 3852 3852 I python : File "kivy/graphics/instructions.pyx", line 60, in kivy.graphics.instructions.Instruction.__init__
11-26 00:53:42.846 3852 3852 I python : TypeError: Cannot create graphics instruction outside the main Kivy thread
...
11-26 00:53:42.855 3852 3933 I python : File "/home/kaushik/PycharmProjects/Tesekkurler/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/tesekkurlerapp/arm64-v8a/kivy/clock.py", line 733, in tick
11-26 00:53:42.856 3852 3933 I python : File "/home/kaushik/PycharmProjects/Tesekkurler/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/tesekkurlerapp/arm64-v8a/kivy/clock.py", line 776, in post_idle
11-26 00:53:42.856 3852 3933 I python : File "kivy/_clock.pyx", line 620, in kivy._clock.CyClockBase._process_events
11-26 00:53:42.857 3852 3933 I python : File "kivy/_clock.pyx", line 653, in kivy._clock.CyClockBase._process_events
11-26 00:53:42.857 3852 3933 I python : File "kivy/_clock.pyx", line 649, in kivy._clock.CyClockBase._process_events
11-26 00:53:42.858 3852 3933 I python : File "kivy/_clock.pyx", line 218, in kivy._clock.ClockEvent.tick
11-26 00:53:42.859 3852 3933 I python : File "/home/kaushik/PycharmProjects/Tesekkurler/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/tesekkurlerapp/arm64-v8a/kivy_garden/mapview/view.py", line 756, in do_update
11-26 00:53:42.859 3852 3933 I python : AttributeError: 'MapCode' object has no attribute '_scatter'
11-26 00:53:42.859 3852 3933 I python : Python for android ended.
# org.kaushik.tesekkurlerapp terminated
When I move the line
app.root.ids.MapCode.center_on(lat, lon)
directly inside the on_start function of main. it works.
Was working with kivymd app in the beginning. Had some issues with it so replaced it with kivy app. but somehow no luck. I also have made changes as per kivy plyer gps not working after update to Android 12
and atleast now my gps works.
Related
I already have changed the variable path on the system and when i try to install it on the terminal is says "Requirement already satisfied: openpyxl in c:\users\danie\appdata\local\programs\python\python310\lib\site-packages (3.0.10)
Requirement already satisfied: et-xmlfile in c:\users\danie\appdata\local\programs\python\python310\lib\site-packages (from openpyxl) (1.1.0)"
however when i try installing it on Pycharm it says:
enter code here
(danie) PS C:\Users\danie\Desktop\PythonProjects> python -m pip install --upgrade pip
Traceback (most recent call last):
File "C:\Users\danie\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\danie\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\danie\Desktop\PythonProjects\danie\lib\site-packages\pip\__main__.py", line 29, in <module>
from pip._internal.cli.main import main as _main
File "C:\Users\danie\Desktop\PythonProjects\danie\lib\site-packages\pip\_internal\cli\main.py", line 9, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "C:\Users\danie\Desktop\PythonProjects\danie\lib\site-packages\pip\_internal\cli\autocompletion.py", line 10, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "C:\Users\danie\Desktop\PythonProjects\danie\lib\site-packages\pip\_internal\cli\main_parser.py", line 8, in <module>
from pip._internal.cli import cmdoptions
File "C:\Users\danie\Desktop\PythonProjects\danie\lib\site-packages\pip\_internal\cli\cmdoptions.py", line 29, in <module>
from pip._internal.models.target_python import TargetPython
ModuleNotFoundError: No module named 'pip._internal.models.target_python'
(danie) PS C:\Users\danie\Desktop\PythonProjects> python -m pip install --upgrade pip
Traceback (most recent call last):
File "C:\Users\danie\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\danie\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\danie\Desktop\PythonProjects\danie\lib\site-packages\pip\__main__.py", line 29, in <module>
from pip._internal.cli.main import main as _main
File "C:\Users\danie\Desktop\PythonProjects\danie\lib\site-packages\pip\_internal\cli\main.py", line 9, in <module>
from pip._internal.cli.autocompletion import autocomplete
utocompletion.py", line 10, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "C:\Users\danie\Desktop\PythonProjects\danie\lib\site-packages\pip\_internal\cli\main_parser.py", line 8, in <module>
from pip._internal.cli import cmdoptions
File "C:\Users\danie\Desktop\PythonProjects\danie\lib\site-packages\pip\_internal\cli\cmdoptions.py", line 29, in <module>
from pip._internal.models.target_python import TargetPython
ModuleNotFoundError: No module named 'pip._internal.models.target_python'
(danie) PS C:\Users\danie\Desktop\PythonProjects> python --version
Python 3.10.5
(danie) PS C:\Users\danie\Desktop\PythonProjects> pip install openpyxl
Traceback (most recent call last):
File "C:\Users\danie\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\danie\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\danie\Desktop\PythonProjects\danie\Scripts\pip.exe\__main__.py", line 4, in <module>
File "C:\Users\danie\Desktop\PythonProjects\danie\lib\site-packages\pip\_internal\cli\main.py", line 9, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "C:\Users\danie\Desktop\PythonProjects\danie\lib\site-packages\pip\_internal\cli\autocompletion.py", line 10, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "C:\Users\danie\Desktop\PythonProjects\danie\lib\site-packages\pip\_internal\cli\main_parser.py", line 8, in <module>
from pip._internal.cli import cmdoptions
File "C:\Users\danie\Desktop\PythonProjects\danie\lib\site-packages\pip\_internal\cli\cmdoptions.py", line 29, in <module>
from pip._internal.models.target_python import TargetPython
ModuleNotFoundError: No module named 'pip._internal.models.target_python'
So my docker file has the following line
RUN python -m spacy download en_core_web_sm
Which throws an error stating thinc module is not found.
So, I decided to add the following line above the previous line.
RUN pip install thinc
When I compile I get the following error.
Step 30/48 : RUN pip install thinc
---> Running in 7ba293263245
Collecting thinc
Downloading https://files.pythonhosted.org/packages/25/99/e21c2a1622c193b2c93a628496fea4525a0ce93e3b47f3cb06559b6ff3ee/thinc-7.4.3.tar.gz (1.3MB)
Complete output from command python setup.py egg_info:
BLIS_COMPILER? None
WARNING: pip versions <19.3 (currently installed: 9.0.1) are unable to detect binary wheel compatibility for blis. To avoid a source install with a very long compilation time, please upgrade pip with `pip install --upgrade pip`.
If you know what you're doing and you really want to compile blis from source, please set the environment variable BLIS_REALLY_COMPILE=1.
Traceback (most recent call last):
File "/opt/app-root/lib/python3.6/site-packages/setuptools/sandbox.py", line 157, in save_modules
yield saved
File "/opt/app-root/lib/python3.6/site-packages/setuptools/sandbox.py", line 198, in setup_context
yield
File "/opt/app-root/lib/python3.6/site-packages/setuptools/sandbox.py", line 248, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/opt/app-root/lib/python3.6/site-packages/setuptools/sandbox.py", line 278, in run
return func()
File "/opt/app-root/lib/python3.6/site-packages/setuptools/sandbox.py", line 246, in runner
_execfile(setup_script, ns)
File "/opt/app-root/lib/python3.6/site-packages/setuptools/sandbox.py", line 47, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-v4oqr4r6/blis-0.7.3/setup.py", line 219, in <module>
"cython>=0.25",
SystemExit: 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/app-root/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 1101, in run_setup
run_setup(setup_script, args)
File "/opt/app-root/lib/python3.6/site-packages/setuptools/sandbox.py", line 251, in run_setup
raise
File "/opt/rh/rh-python36/root/usr/lib64/python3.6/contextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "/opt/app-root/lib/python3.6/site-packages/setuptools/sandbox.py", line 198, in setup_context
yield
File "/opt/rh/rh-python36/root/usr/lib64/python3.6/contextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "/opt/app-root/lib/python3.6/site-packages/setuptools/sandbox.py", line 169, in save_modules
saved_exc.resume()
File "/opt/app-root/lib/python3.6/site-packages/setuptools/sandbox.py", line 144, in resume
six.reraise(type, exc, self._tb)
File "/opt/app-root/lib/python3.6/site-packages/pkg_resources/_vendor/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/opt/app-root/lib/python3.6/site-packages/setuptools/sandbox.py", line 157, in save_modules
yield saved
File "/opt/app-root/lib/python3.6/site-packages/setuptools/sandbox.py", line 198, in setup_context
yield
File "/opt/app-root/lib/python3.6/site-packages/setuptools/sandbox.py", line 248, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/opt/app-root/lib/python3.6/site-packages/setuptools/sandbox.py", line 278, in run
return func()
File "/opt/app-root/lib/python3.6/site-packages/setuptools/sandbox.py", line 246, in runner
_execfile(setup_script, ns)
File "/opt/app-root/lib/python3.6/site-packages/setuptools/sandbox.py", line 47, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-v4oqr4r6/blis-0.7.3/setup.py", line 219, in <module>
"cython>=0.25",
SystemExit: 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-_lc_0t4n/thinc/setup.py", line 276, in <module>
setup_package()
File "/tmp/pip-build-_lc_0t4n/thinc/setup.py", line 272, in setup_package
cmdclass={"build_ext": build_ext_subclass},
File "/opt/rh/rh-python36/root/usr/lib64/python3.6/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/opt/app-root/lib/python3.6/site-packages/setuptools/dist.py", line 315, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/opt/app-root/lib/python3.6/site-packages/setuptools/dist.py", line 361, in fetch_build_eggs
replace_conflicting=True,
File "/opt/app-root/lib/python3.6/site-packages/pkg_resources/__init__.py", line 850, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/opt/app-root/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1122, in best_match
return self.obtain(req, installer)
File "/opt/app-root/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1134, in obtain
return installer(requirement)
File "/opt/app-root/lib/python3.6/site-packages/setuptools/dist.py", line 429, in fetch_build_egg
return cmd.easy_install(req)
File "/opt/app-root/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 665, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/opt/app-root/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 695, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/opt/app-root/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 876, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/opt/app-root/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 1115, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/opt/app-root/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 1103, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with 1
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-_lc_0t4n/thinc/
You are using pip version 9.0.1, however version 20.2.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
The image is
FROM centos/python-36-centos7
before you install python packages add the following line
RUN pip install --upgrade pip
codes:
from torchvision.models import vgg16
vgg_model = vgg16(pretrained=True).features[:16]
the log output:
Traceback (most recent call last):
File "train.py", line 95, in <module>
vgg_model = vgg16(pretrained=True).features[:16]
File "/opt/conda/lib/python3.7/site-packages/torchvision/models/vgg.py", line 150, in vgg16
return _vgg('vgg16', 'D', False, pretrained, progress, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/torchvision/models/vgg.py", line 93, in _vgg
progress=progress)
File "/opt/conda/lib/python3.7/site-packages/torch/hub.py", line 480, in load_state_dict_from_url
os.makedirs(model_dir)
File "/opt/conda/lib/python3.7/os.py", line 213, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/opt/conda/lib/python3.7/os.py", line 213, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/opt/conda/lib/python3.7/os.py", line 223, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/.cache'
I have to run my codes on GPU clusters, and I have no rights to modify these docker images on GPU clusters. What can I do?
I need to download opencv to run a project that requires python 3.6 and opencv. I have downloaded opencv.
I know my error is similar to OpenCV giving an error whenever import cv2 is used but I have tried both of the solutions mentioned in that question and neither works for me.
!pip install opencv-python
Requirement already satisfied: opencv-python in /Users/aa/.conda/envs/py36/lib/python3.6/site-packages (3.4.2.16)
Requirement already satisfied: numpy>=1.11.3 in /Users/aa/.conda/envs/py36/lib/python3.6/site-packages (from opencv-python) (1.18.3)
but when i typed
import cv2
I got the following error:
ImportError Traceback (most recent call last)
<ipython-input-27-c8ec22b3e787> in <module>
----> 1 import cv2
~/.conda/envs/py36/lib/python3.6/site-packages/cv2/__init__.py in <module>
1 import importlib
2
----> 3 from .cv2 import *
4 from .data import *
5
ImportError: dlopen(/Users/aa/.conda/envs/py36/lib/python3.6/site-packages/cv2/cv2.cpython-36m-darwin.so, 2): Symbol not found: __ZN10QBoxLayout10invalidateEv
Referenced from: /Users/aa/.conda/envs/py36/lib/python3.6/site-packages/cv2/cv2.cpython-36m-darwin.so
Expected in: /Users/aa/.conda/envs/py36/lib/python3.6/site-packages/cv2/.dylibs/QtGui
in /Users/aa/.conda/envs/py36/lib/python3.6/site-packages/cv2/cv2.cpython-36m-darwin.so
I also tried to use conda to install but I always got the following error:
Proceed ([y]/n)? y
Preparing transaction: failed
>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/anaconda2/lib/python2.7/site-packages/conda/exceptions.py", line 819, in __call__
return func(*args, **kwargs)
File "/anaconda2/lib/python2.7/site-packages/conda/cli/main.py", line 78, in _main
exit_code = do_call(args, p)
File "/anaconda2/lib/python2.7/site-packages/conda/cli/conda_argparse.py", line 77, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "/anaconda2/lib/python2.7/site-packages/conda/cli/main_install.py", line 11, in execute
install(args, parser, 'install')
File "/anaconda2/lib/python2.7/site-packages/conda/cli/install.py", line 253, in install
handle_txn(unlink_link_transaction, prefix, args, newenv)
File "/anaconda2/lib/python2.7/site-packages/conda/cli/install.py", line 282, in handle_txn
unlink_link_transaction.execute()
File "/anaconda2/lib/python2.7/site-packages/conda/core/link.py", line 223, in execute
self.verify()
File "/anaconda2/lib/python2.7/site-packages/conda/common/io.py", line 46, in decorated
return f(*args, **kwds)
File "/anaconda2/lib/python2.7/site-packages/conda/core/link.py", line 200, in verify
self.prepare()
File "/anaconda2/lib/python2.7/site-packages/conda/core/link.py", line 192, in prepare
stp.remove_specs, stp.update_specs)
File "/anaconda2/lib/python2.7/site-packages/conda/core/link.py", line 282, in _prepare
mkdir_p(transaction_context['temp_dir'])
File "/anaconda2/lib/python2.7/site-packages/conda/gateways/disk/__init__.py", line 60, in mkdir_p
makedirs(path)
File "/anaconda2/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/anaconda2/.condatmp'
Whenever I request to GoogleVision api's, this error pops up. Even cannot install/uninstall any of the package
Sample Output:
engineer#engineer:~$ sudo pip install --upgrade google-cloud
[sudo] password for engineer:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 7, in <module>
from pip import main
File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 26, in <module>
from pip.utils import get_installed_distributions, get_prog
File "/usr/local/lib/python2.7/dist-packages/pip/utils/__init__.py", line 27, in <module>
from pip._vendor import pkg_resources
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 3018, in <module>
#_call_aside
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 3004, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 3046, in _initialize_master_working_set
dist.activate(replace=False)
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2578, in activate
declare_namespace(pkg)
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2152, in declare_namespace
_handle_ns(packageName, path_item)
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2091, in _handle_ns
loader.load_module(packageName)
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/home/engineer/.local/lib/python2.7/site-packages/google/cloud/logging/__init__.py", line 18, in <module>
from pkg_resources import get_distribution
File "/home/engineer/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3036, in <module>
#_call_aside
File "/home/engineer/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3020, in _call_aside
f(*args, **kwargs)
File "/home/engineer/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3064, in _initialize_master_working_set
for dist in working_set
File "/home/engineer/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3064, in <genexpr>
for dist in working_set
File "/home/engineer/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2594, in activate
declare_namespace(pkg)
File "/home/engineer/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2162, in declare_namespace
_handle_ns(packageName, path_item)
File "/home/engineer/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2097, in _handle_ns
loader.load_module(packageName)
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/usr/local/lib/python2.7/dist-packages/google/cloud/logging/__init__.py", line 18, in <module>
from google.cloud.logging.client import Client
File "/usr/local/lib/python2.7/dist-packages/google/cloud/logging/client.py", line 32, in <module>
from google.cloud.client import JSONClient
ImportError: cannot import name JSONClient
I had same issue today with 0.24.0 version,
I have downgraded google-cloud to 0.23.0 for now,
pip install --upgrade google-cloud==0.23.0
its working