Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to install logging module (Python)

Tags:

I'm trying to install the logging module for Python 3.4. I'm using pip3 install logging. Both times I run into a SyntaxError at line 618 of the init method: "raise NotImplementedError, 'emit must be implemented '\".

Someone posted the same question as me, and solved their problem by deleting an interfering third party library called logging: Logging module not working with Python3.

But I have no such library already installed in my site-packages directory.

Thanks!

like image 781
sjplural Avatar asked Oct 16 '15 16:10

sjplural


People also ask

Do I need to install logging Python?

Python provides an in-built logging module which is part of the python standard library. So you don't need to install anything. To use logging, all you need to do is setup the basic configuration using logging.

What is logging package in Python?

Python comes with a logging module in the standard library that provides a flexible framework for emitting log messages from Python programs. This module is widely used by libraries and is the first go-to point for most developers when it comes to logging.

Does Python install PIP?

PIP is automatically installed with Python 2.7.9+ and Python 3.4+ and it comes with the virtualenv and pyvenv virtual environments.


1 Answers

logging is part of the Python standard library, and has been since version 2.3. It's available as soon as you install Python. You don't need to pip install anything...

like image 183
MattDMo Avatar answered Oct 10 '22 02:10

MattDMo