LookupError: unknown encoding: cp0

I am on window 7, python 2.7.2, pandas 0.11.0, django 1.4, wsgi and apache 2.2. I have a pandas script that works fine if I run it directly with python and also works in ipython with %run. ...

OS X - Deciding between anaconda and homebrew Python environments

I use Python extensively on my Mac OS X, for both numerical applications and web development (roughly equally). I checked the number of Python installations I had on my laptop recently, and was...

Update multiple objects at once in Django?

I am using Django 1.9. I have a Django table that represents the value of a particular measure, by organisation by month, with raw values and percentiles: class MeasureValue(models.Model): org...

Best Practices with Anaconda and Brew

I have just got a new Macbook with OSX Sierra, so want to ensure my development environment is setup properly. I am looking to follow the 'best practices' mentioned here:...

pip3 install -r requirements.txt - Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-a0nd7us1/post/

When I try pip3 install -r requirements.txt I get the error: Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-a0nd7us1/post/ It seems to me that I have tried...

How to create a virtual environment for Django in Pycharm?

Currently, I am developing a Django web app in a virtual environment but when I try to edit the web app it just seems that the libraries that I installed in the virtual environment are not found....

Can't install python packages/modules inside a virtual environment

I don't know what just happened or what I did. It suddenly just can't install the python packages/modules when I tried to install them. I am using a macbook pro laptop. I have been using virtual...

How to Get All Results from Elasticsearch in Python

I am brand new to using Elasticsearch and I'm having an issue getting all results back when I run an Elasticsearch query through my Python script. My goal is to query an index ("my_index" below),...

Pandas CSV to Django Response

I have a DataFrame generated from a database. How do I provide a response wherein it downloads a CSV? Basically, df = magic_dataframe_supplier() response =...

Could not find a version that satisfies the requirement ItsDangerous==1.0.0. Django, Pythonanywhere

When I try to deploy my application to pythonanywhere, the following error it is returned. Could not find a version that satisfies the requirement ItsDangerous==1.0.0 How can I solve it? I...

Django Create and output txt file from view

I have a scenario where a user uploads some data, Django does some processing in pandas and returns a potentially large txt file. I've got this working but I'm unsure about the scalability of the...

How to run Django on Docker container

I'm setting up a django server application on docker. docker runs the container well but the command to run django is not taking by docker. I've already gone through few youtube videos but none of...

ERROR: You must give at least one requirement to install -- when running: pip install --upgrade --no-binary hdbscan

I am trying to install hdbscan in my PC which runs Windows 10 and has installed Python 3.6. My first attempt failed: (base) C:\WINDOWS\system32>pip install hdbscan --user Collecting hdbscan ...

"django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet" when trying to load data into my model

I am developing an app in Django. I want to load data inside my model, that is glossary_entry, but the data is stored inside an xlsx file, that is dati_prova.xlsx. In order to achieve this, I have...

Doing Class.objects.filter(...) pattern in python

I am looking to use the pattern used in django models of Model.objects.filter(...) to build filters across data. This would probably be a good use case of pandas, but I'm more interested in...

Read a Django UploadedFile into a pandas DataFrame

I am attempting to read a .csv file uploaded to Django into a DataFrame. I am following the instructions and the Django REST Framework page for uploading files. When I PUT a .csv file to a defined...

Why does Heroku has to install so many modules every time?

I am developing an app in Django and I am deploying it on Heroku. Why does, with each push, Heroku has to install all these modules? I know there is a way to prevent it from doing it all the...

django cant access mysql docker compose

this is my docker-compose file version: '3' services: djangoSql: restart: always network_mode: bridge container_name: djangoSql image: mysql volumes: - .:/code ...

django.db.utils.InterfaceError: (0, '') when using django model

I have django.db.utils.InterfaceError: (0, '') error on django. I googled around and found this error is related with django mysql connection. What I have done is just like this , from...

How can I display pandas dataframe into django template?

I have a pandas dataframe and i want to show this dataframe into my django template. But everytime the code compile successfully without showing any table in my django web app. What am i missing...

Quickly update django model objects from pandas dataframe

I have a Django model that records transactions. I need to update only some of the fields (two) of some of the transactions. In order to update, the user is asked to provide additional data and I...

Why was camelot not found even if camelot is already on my computer?

Here is the code where I am trying to import camelot: import camelot as cl Here is the response: ModuleNotFoundError Traceback (most recent call...

docker build ERROR: Could not install packages due to an EnvironmentError: [Errno 2]

I'm getting this error when I run docker build while its processing the requirements file. ERROR: Could not find a version that satisfies the requirement mkl-fft==1.0.6 (from -r /requirements.txt...

virtualenv: pre-installed with packages on creating virtual environment

I created a virtual environment using command virtualenv env on my terminal. On using pip freeze > requirements.txt after activating the virtual environment, I was a bunch of packages...

How to activate virtual envirooment for existing django project using pipenv in python 3.8

I developed a Django webapp project using Django 2.2.1 in python 3.7.2 in a pipenv version 2018.11.26 virtual environment in MacBook Air. After an unintentional update to python 3.8 using brew...

Django error 'URLs with hostname components are not permitted'

I have deployed a django application which invokes a python file to send captured data on django form to a third party independent server. The problem is that when the python file is invoked from...

Docker error (Could not build wheels for Pandas which use PEP 517 and connot be installed directly)

First of all, my environment is [python ver = 3.8] [django = 3.1.6] [pandas = 1.1.3 or (1.2.1) use anything] and I use pycharm, venv I want to make my prj to docker-compose build ERROR: Failed...

ERROR: Could not build wheels for pandas which use PEP 517 and cannot be installed directly

I am using Docker with my dockerfile as: FROM python:3-alpine WORKDIR /app COPY ./requirements.txt . RUN apk update && apk add postgresql-dev gcc python3-dev musl-dev libffi-dev RUN pip install...

Numpy from alpine package repo fails to import c-extensions

I am making a docker image that needs pandas and numpy but the installation via pip takes around 20 mins which is too long for my use case. I then opt to install pandas and numpy from alpine...

How to implement js to django to run 3 functions?

I have found this question which could work for me, but I don't know javascript. I want to run 3 functions like you see in my views.py, but I'm unable to do that because I use (forms.Form) one...