"import babel.dates" gets me permission denied

In python, when I run import babel.dates I get a permission denied: Python 2.7.5+ (default, Jun 5 2013, 10:40:07) [GCC 4.8.1] on linux2 Type "help", "copyright", "credits" or "license" for more...

In a virtualenv, pip can see all of my site-packages when I use list, is this normal?

I thought that virtualenv was supposed to encapsulate and hide all of your packages that were already installed. But when I type $sudo virtualenv -p /usr/bin/python3 testenv $source...

Python source debugging with gdb for a C Module

So I'm getting a SIGSEGV signal from my Python C Module. The module has been tested/built in Windows and now I'm attempting to use it under Linux (Linux Mint 17 64-bit). I'm very new to gdb but is...

ImportError with Django 1.8.5 and Celery

I'm trying to get Celery to work Django, following the official documentation, and the video located here:...

Taskqueue for long running tasks in FLEXIBLE app engine

I am building an app using Flexible App Engine and Python3. In the standard appengine, if you needed to run a task that was longer than 60s, you could either use taskqueue, or the deferred library...

Monkey patching operator overloads behaves differently in Python2 vs Python3

Consider the following code: class Foo: def __mul__(self,other): return other/0 x = Foo() x.__mul__ = lambda other:other*0.5 print(x.__mul__(5)) print(x*5) In Python2 (with from...

Why does my Django failed to runserver after I installed channels?

Everything worked fine until I installed 'channels'. After I installed channels, I added 'channels' in INSTALLED_APPS in settings.py, and then when I do $ python3 manage.py runserver I get the...

apt-get upgrade, apt-get install not working.

I recently updated Python 2.7.6 to Python 2.7.12. Since then, when I run apt-get upgrade or apt-get install or apt-get autoremove` I get the following error: Reading package lists... Done Building...

pip3 install not working - No module named 'pip._vendor.pkg_resources'

When trying to install a package for Python 3 (in Ubuntu), using pip3 install packageName (or sudo pip3 install packageName), I get the following error message: Traceback (most recent call last): ...

pip3 Crashing with Import Error

Python 3.5.2 Ubuntu 16.04 LTS Trying to use pip3 to install some packages and it returns the following regardless of argument: Traceback (most recent call last): File...

ImportError: No module named 'config.settings'; 'config' is not a package

I'm trying to get my cookiecutter-django app running under Apache with mod_wsgi installed via pip. python3 manager.py runserver works. But after running it in Apache, I got an error saying Module...

Error using deferred.defer on App Engine

I'm trying to use deferred.defer on App Engine (flexible) as per the example on: https://cloud.google.com/appengine/articles/deferred It's a Python3 app. As the tutorial says, I added these lines...

Can't `pip3 install -r requirement.txt`

I'm getting dependency error while installing dependency for django project Here is my part of requirement...

ImportError: cannot import name 'hex_regex'

I'm working on adding django-location-field. However when I add the following code from django.contrib.gis.geos import Point from location_field.models.spatial import LocationField address =...

pyinstaller ImportError error - how to solve it?

I have installed pyinstaller in my Linux in order to create an executable to my Python script, which runs normaly with the command: python3 exemplo.py However when I execute bellow...

Cuda Runtime Error cudaErrorNoDevice: no CUDA-capable device is detected

I am using Chainer, Cupy for CUDA 8.0 . I am trying to train machine learning model using python3.5 script, but I got this error: cupy.cuda.runtime.CUDARuntimeError: cudaErrorNoDevice: no...

Cannot deploy Google's AppEngine - unable to install google.appengine library - ModuleNotFound ez_setup

I'm trying to deploy an API to Google Cloud on Google AppEngine, using python3 with the standard environment, and I want to use the defer function to put functions in Google CloudTasks, as seen...

Access DynamoDB in Golang Fargate Task

I'm trying to access DynamoDB from my Fargate task, which is written in golang. And all I get is a timeout. What I am missing? I'm using the Cloudformation templates from AWS Labs (here) plus a...

Missing tkinter package on ubuntu 18.04

This python script has a problem with tkinter but I don't know how to fix it as tkinter is installed, searched on the web but didn't find anything useful [email protected]:~$ python3 predict.py...

Uninstall all Python packages in Ubuntu 18.04 having multiple python versions

When I type python and hit tab the following packages are shown python python3 python3.6m python3m python2 python3.6 python3.6m-config ...

How to get UserRequest data from itop REST API

I got this error when I used Go's standard http library to send post requests to the itop rest api. {"code":5,"message":"Error: Missing parameter 'auth_user'"} this is the request data...

Python3 CTypes error loading dylib on Mac 10.14 (Mojave)

Background I have read countless GitHub project threads and everything I can find on StackOverflow about this problem, though so far no luck. I have a Mac 10.14 box running with the stock...

How to execute govc/pyvmomi run command which lists output of server on local pc

I am able to list all the vm's using govmomi(not govc which is one line command in terminal) but I am trying to implement this: govc guest.run -vm $vm_name cat sample.txt from scratch rather than...

Django + Svelte styles not working, MIME type ('text/html') is not a supported stylesheet MIME type

I am trying to connect my Django app to a Svelte front-end. I directed my template finder to the build directory of the Svelte folder. I won't be using the template features of Django, will be...

calling python from golang

I am following https://poweruser.blog/embedding-python-in-go-338c0399f3d5 example on using python code from a golang application. I installed the python3.8 dev. When I try go build I...

Segmentation fault (core dumped) on training the deep neural network /torch/cuda/__init__.py", line 172 in _lazy_init

python3 -q -X faulthandler test.py --model.backbone=resnet18 2021-02-07 20:14:21.198583: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library...

Error when running executable generated by pyinstaller [pyvisa-py]

I'm trying to build an executable from a simple python script using pyvisa-py but I'm running into error after I run the executable generated by pyinstaller. Here what my small python code looks...

Im trying to build mediapipe on my jetson nano

So Im trying to build a mediapipe whl file for my jetson nano by following this guide https://github.com/jiuqiant/mediapipe_python_aarch64 I am successful on building it with my raspberry pi 4. By...