How to reset virtualenv and pip?

I installed virtualenv on my Ubuntu 10.04 server. Now when I do pip freeze it shows me the following...

From virtualenv, pip freeze > requirements.txt give TONES of garbage! How to trim it out?

I'm following this tutorial: http://devcenter.heroku.com/articles/django At some point I'm suposed to do: pip freeze > requirements.txt (Ofc. from virtualenv created instance of python) And I...

Creating Python daemon - 'module' object has no attribute 'DaemonContext'

I'm trying to daemonize my app and am getting the error: out: with daemon.DaemonContext(): out: AttributeError: 'module' object has no attribute 'DaemonContext' It looks like other people...

import pymongo causes `ImportError: cannot import name BSON`. how do you fix the import error?

I'm having trouble getting a simple Hello World app to work using Flask, MongoDB, and Python. The app is bombing when trying to import from the bson module. All modules were installed successfully...

Heroku push of django app gets "No module named psycopg2.extensions"

I'm trying to push a django app to heroku and getting an error that I haven't seen anywhere in the heroku or stackoverflow forums. I'm using postgres. I'm not sure where to proceed; I see nothing...

Django logout not working

I seem to have the same problem as in this question: https://stackoverflow.com/questions/2074980/django-logout-problem Mine is a bit weirder, it works in google chrome.... but not in...

Manually remove Python package on Heroku

I was running heroku push master, and got this: ----- Python app detected ----- No runtime.txt provided; assuming python-2.7.3. ----- Using Python runtime (python-2.7.3) ----- Installing...

sqlalchemy.exc.ArgumentError: Can't load plugin: sqlalchemy.dialects:driver

I am trying to run alembic migration and when I run alembic revision --autogenerate -m "Added initial tables" It fails saying sqlalchemy.exc.ArgumentError: Can't load plugin:...

Python Django requirements.txt

I have a requirements.txt file containing all my dependencies but it is not processed correctly : After a pip install -r requirements.txt, I get the following pip freeze...

Error on django runserver - OverflowError: getsockaddrarg: port must be 0-65535

I came back to my previously working django project to find the following error after the runserver command: 0 errors found March 20, 2014 - 23:58:52 Django version 1.6.2, using settings...

Python pip segfault when installing package

Python 2.7.6 (default, Oct 21 2014, 13:39:51) [GCC 4.1.2 20080704 (Red Hat 4.1.2-55)] on linux2 Type "help", "copyright", "credits" or "license" for more information. Been running into this...

Format: "png" not recognized at pygraphviz Python, Heroku

The following code: import pygraphviz as p def main(): A=p.AGraph() A.add_edge(1,2) A.layout(prog="dot") A.draw("1.png") if __name__ == '__main__': main() wokrs fine locally, but when...

Django project looking for "attribute '_session_cache'"

So I have a Django project that doesn't use a database (the 'DATABASES' setting is commented out). I chose to use Django as there's a chance I will need the database functionality in the future....

Django showing error (A server error occurred. Please contact the administrator.) when trying to access the local server (127.0.0.1:800)

I am totally new to this. I am running the version 1.8 of Django. The error it shows in console is: F:\django\mysite>python manage.py runserver Performing system checks... System check identified...

Django : error: [Errno 10053] An established connection was aborted by the software in your host machine

I got error when i perform ajax request. Without authentication lines user = authenticate(username = user_username, password = user_password) in the views.py, success function is called. And if i...

Django ImportError: No module named middleware

I am using Django version 1.8 and python 2.7. I am getting the following error after running my project. Traceback (most recent call last): File "C:\Python27\lib\wsgiref\handlers.py", line 85,...

How to fix error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

I'm trying to install odoo on a fresh installation of Linux on a VirtualBox machine. I have entered in the commands found here as is: Odoo Development Read the Docs. The following command is what...

"AssertionError: write() argument must be a bytes instance" when running WSGISOAPHandler

I have a SOAP server with pysimplesoap in Python 3. Code from wsgiref.simple_server import make_server application = WSGISOAPHandler(dispatcher) wsgid = make_server('', 8008,...

Tried using white noise and got the following "error ImportError: No module named 'whitenoise.middleware' "

I tried to follow the whitenoise instruction. I installed it from my requirements.txt the following are the versions I'm using whitenoise==2.0.6 Django==1.9.2 then I installed it in my...

Django middleware 'module' object is not callable

I have problem with middleware I found a lot of questions about it but nothing help in my case. I use middleware to get current_user to use in my model to save modified user in save method without...

Django ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine

I am using django with postgresql, whenever I try to save or delete anything, this error occurs - Traceback (most recent call last): File "c:\program files...

Django Python - No connection could be made because the target machine actively refused it

I have a Django python server in a virtual environment at the root of my hard drive. In the command line, when I activate the env and run python manage.py 192.168.0.47:80 it starts the server...

Install requirements.txt with pip

I am trying to install remote environment like on remote server using requirements.txt. So first I went to Server went to virtualenv by source bin/activate and typed: pip freeze > requirements.txt...

raise RuntimeError('You need to use the eventlet server. '

In my project, I created a app: the website_chat/views.py code: async_mode = 'eventlet' import os from django.http import HttpResponse import socketio basedir =...

missing /bin folder inside conda environment

I created a conda environment using following command: conda create -p D:\batch\tasks\shared\test-condaenv-users python=3.7 pip -y But noticed that when I activate the environment then try to pip...

How to fix UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcf in position 5: invalid continuation byte

I am trying to run a newly created environment on a server and get UnicodeDecodeError. Windows 7, 64-bit. I have created a virtual environment and directed code to the source folder. Here are...

SocketIo integration with Django

I have been trying to integrate socketio with Django, And I am getting the following error. [31/Mar/2020 14:50:27] "GET /socket.io/?EIO=3&transport=polling&t=N4n4ds4&b64=1 HTTP/1.1" 200...

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 8: unexpected end of data

for a week I have been using the Gmail API without problem, but I don't know why since yesterday an error appeared while initializing this API: UnicodeDecodeError: 'utf-8' codec can't decode byte...

AttributeError: type object 'Product' has no attribute 'objects'

Python 3.8.3 asgiref 3.3.1 Django 2.2 django-crispy-forms 1.10.0 djangorestframework 3.11.1 Pillow 7.2.0 pip 19.2.3 psycopg2 ...

Can't figure out why I'm getting `Reverse for 'app_list' with keyword arguments '{'app_label': ''}' not found` in a django project

The project has 2 apps - accounts (very basic custom users) and portal. myproject/myproject/urls.py: from django.contrib import admin from django import urls from portal import admin as...