Articles tagged "python"
Page 6 of 13
python3 http server command line
In this short tutorial we explain how to start a simple http server from the command line, very useful to share files across the network. Just execute python -m http.server 8000
OSX: No package glib-2.0 Found - PKG_CONFIG Fix
The error: PKG_CONFIG_PATH environment variable No package 'glib-2.0' found, could be easy solved when using brew by settings the PKG_CONFIG_PATH to the following value: export...
Fix: AttributeError - Token Has No Attribute 'objects' [Django REST Framework]
Fix "AttributeError: type object 'Token' has no attribute 'objects'" in Django REST Framework. Add rest_framework.authtoken to INSTALLED_APPS.
Youtube api: download all videos from channel
In this tutorial, we are going to explain how to use YouTube API to fetch all videos on a channel.
Raspberry Pi Python: ZipImportError zlib Fix
Install the package zlib1g-dev using the command: sudo apt-get install zlib1g-dev to fix the error zipimport.ZipImportError: while installing python 3.7 from sources
SOLUTION: ValueError: bad marshal data (unknown type code)
If while doing a python setup.py install you got the error
How to find the mime type of a file in Python?
Here are some example on how to guess the mime type of a file using python. The first example uses the filename only and the second example opens the file to guess the mime type.
pip: six issue when installing package
If you are using macOS and you get a permission denied while installing with pip install six, then you could try to execute: pip install --ignore-installed six. check our solution for more details.
macOS Mojave pyenv: Install failed, "zlib not available"
If you are having the error
Flask API POST Request: Handle JSON Data [Complete Tutorial]
Learn how to handle POST requests in Flask API. Complete tutorial with JSON data handling, validation, error handling, and testing with curl and Postman.