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
1
vote
0 answers

Problems with openshift and package six

I have an openshift application and I need to use a APScheduler package which needs six==1.9.0 package. If I do pip install six==1.9.0 I get: Collecting six==1.9.0 Downloading six-1.9.0-py2.py3-none-any.wh Installing collected packages: six …
Damia Fuentes
  • 5,308
  • 6
  • 33
  • 65
1
vote
2 answers

Weird issue with python six: cannot import urllib

raven ships with its own version of the six module which seems to prevent me from importing a module which exists in the standalone six module. Please see below: Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help",…
user59634
1
vote
1 answer

Writing py2.x and py3.x compatible code without six.text_type

Given the six.text_type function. it's easy to write i/o code for unicode text, e.g. https://github.com/nltk/nltk/blob/develop/nltk/parse/malt.py#L188 fout.write(text_type(line)) But without the six module, it would require a try-except gymnastics…
alvas
  • 115,346
  • 109
  • 446
  • 738
1
vote
1 answer

Should I copy six.py into my project or I can add it into setup requires instead?

Are there any pros and cons of contributing six library together with my project code base or I can use it as a regular python dependency?
proofit404
  • 281
  • 1
  • 13
1
vote
0 answers

Mac - running python with sudo makes it get wrong libraries

I'm trying to install pycuda on my mac machine. Problem is, when I run python with sudo, it gets the wrong version for python-six, which is required by pycuda. How can I fix this? Jean-Lucs-MacBook-Pro:test Jean$ sudo python Password: Python 2.7.6…
Jean-Luc Nacif Coelho
  • 1,006
  • 3
  • 14
  • 30
0
votes
0 answers

ModuleNotFoundError: No module named 'six' | python =3.10 | six is already installed

I am getting below "No module named 'six'" , but it is already installed sudo virtualenv ve Traceback (most recent call last): File "/usr/bin/virtualenv", line 5, in from virtualenv.__main__ import run_with_catch File…
souradeep majumdar
  • 137
  • 1
  • 1
  • 17
0
votes
0 answers

How can i add six to yocto image?

Hey There. I'm trying to add six to my yocto image, I saw there was a recipe in the open-embedded git but perhaps it was removed (in python-devtools, for some odd reason. I'm trying to "adapt" the old recipe into my layer but i get yet another error…
0
votes
0 answers

How do I fix "Import 'file_name' couldn't be resolved by pylance" problem?

This is the code: from .packages import six from .packages.six.moves.http_client import HTTPConnection as _HTTPConnection from .packages.six.moves.http_client import HTTPException # noqa: F401 And the problem Import…
Raj1969
  • 21
  • 6
0
votes
0 answers

Passing attribute to parent class via child in decorator

I have this class hierarchy class ParentMeta(type): def __new__(v1, name, b, x): # some code return super(ParentMeta, v1).__new__(v1, name, b, x) and then class ServiceMeta(ParentMeta, AnotherServiceMeta): pass The…
Em Ae
  • 8,167
  • 27
  • 95
  • 162
0
votes
0 answers

DistributionNotFound: 'six>=1.4.0' is required

I'm trying to make an exe out of a Python file that uses apscheduler, sqlalchemy, and Tkinter among other libraries. Once compiled, the majority of the app works fine, except for one function that needs to add jobs to the SQLite database. The most…
0
votes
1 answer

i got this error on spyder ImportError: cannot import name 'six' from 'sklearn.externals' despite i have installed the six module

File "C:\Users\Baha cherni\Desktop\python\tp\tp22222.py", line 7, in from sklearn.externals import six ImportError: cannot import name 'six' from 'sklearn.externals' (C:\Users\Baha cherni\anaconda3\lib\site-packages\sklearn\externals_init_.py)
0
votes
0 answers

how to remove six.reraise in Python 3?

I have some Python legacy code that looks like this: except ValueError as e: new = DecodingError( "Failed to decode value {!r} for field {}, got: {}".format( raw_value, field_name, e ) ) …
GMA
  • 5,816
  • 6
  • 51
  • 80
0
votes
2 answers

ERROR - secure_channel() got an unexpected keyword argument 'default_scopes' with .to_dataframe() on bigquery object

Environment Details Python 3.7.12 google-api-core 1.23.0 google-auth 1.35.0 bigquery 2.3.1 let me know if i can provide any other library versions We are querying some data from bigquery using python in airflow, and converting results into a…
Canovice
  • 9,012
  • 22
  • 93
  • 211
0
votes
1 answer

ModuleNotFoundError: No module named 'six' , Six is already installed

I am trying to run this pretty simple text-to-speech program on my Mac: # Import the required module for text # to speech conversion from gtts import gTTS # This module is imported so that we can # play the converted audio import os # The…
0
votes
1 answer

Nativescript can't find six

I installed Nativescript successfully and it works when running ns run android. However, when I try to use ns run ios I get the ominous WARNING: The Python 'six' package not found.-error Same happens, when I try to use ns doctor. I tried EVERYTHING…
Swissdude
  • 3,486
  • 3
  • 35
  • 68