Questions tagged [six]

Six provides simple utilities for wrapping over differences between Python 2 and Python 3.

Six provides simple utilities for wrapping over differences between and . It is intended to support codebases that work on both Python 2 and 3 without modification. six consists of only one Python file, so it is painless to copy into a project.

147 questions
0
votes
1 answer

Cross py2 and py3 way of checking for tuple type?

It seems that six library does not have a tuple type definition and I am currently looking to write the code below in a way that works with both Python 2 and Python 3. return (type(key) in (types.TupleType, types.ListType) PS. Don't blame me for…
sorin
  • 161,544
  • 178
  • 535
  • 806
0
votes
2 answers

How do I install an external module from a wheel?

I'm trying to run someone else's script in Python 2.7 on Win7x64 (but 32-bit Python - I need it to be 2.7 to run pyserial, apparently). It starts with the following lines: import os import matplotlib.pyplot as plt import numpy as np from pylab…
MCA
  • 17
  • 6
0
votes
1 answer

is there a way to install six if I do not have access to internet?

I am trying to install matplotlib on my lab computer that does not have internet access. Since it requires six for its full implementation, I am unable to run the scripts that has matplotlib module. I know how to install six by using pip but am…
ap2051
  • 149
  • 1
  • 8
0
votes
0 answers

"No module named six" error after "sudo pip install six"

when I run python code, debug said No module named six. And I go to terminal to install. I got: Requirement already satisfied (use --upgrade to upgrade): six in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python Then I run…
0
votes
1 answer

Raspberry Pi error with ParsePy and six.py

I am trying to connect my raspberry pi to parse.com wit ParsePy which uses the rest-api from parse.com. I am writing some python code to get it to work and I have an error with the classes supplied by ParsePy. In particular its the datatypes.py…
nardo
  • 149
  • 1
  • 8
0
votes
3 answers

Python2.7: ImportError: six 1.3 or later is required; you have 1.2.0

Got this error when importing matplotlib.pyplot. But I have checked the version of six installed using pip list, and it returns version 1.9.0. And when I checked six.__version__, it returns 1.2.0. Could any one help me?
-1
votes
1 answer

Why python super() not working without parameters in ABCMETA class?

I have a problem with understanding function super() behavior in abc.ABCMeta class in python3.6. class ParentClass(): def test(): return 1 ​ @six.add_metaclass(ABCMeta) class ChildClass(ParentClass): def test(self): test_ =…
-1
votes
2 answers

Unable to install tweepy in Python on Windows 7

I have Python 3.5.2 installed on Windows 7 (64bit). Pip module is installed as well by default. I am new to installing Python packages. I am trying to install tweepy module, but keep running into the problem described below: 1) I tried to install…
Yanic
  • 101
  • 5
-2
votes
1 answer

Django importError (cannot import name 'six')

serializer.py: from .models import stock from rest_framework import serializers class StockSerializer(serializers.ModelSerializer): class Meta: model = stock fields = ('id', 'stock_name', 'price', 'stock_gain',…
H Abdullah
  • 53
  • 6
-2
votes
1 answer

Create a pip package for different versions of Python

I have a rather large chunk of code written in Python 2.7. My end goal is to have working versions in both Python 2 and 3, both install-able via pip and available on GitHub. What are the standard practices for this? What I've done for mypackage Ran…
Sal
  • 1,653
  • 6
  • 23
  • 36
-2
votes
1 answer

Does the six library comes shipped with default python today?

How to install the Six module in Python2.7 shows that six has to be pip installed. But does the six library comes shipped with default python python2.7.x and python3.x today?
alvas
  • 115,346
  • 109
  • 446
  • 738
1 2 3
9
10