f

Could not find suitable distribution for Requirement.parse('urllib2')

I've been running a simple python program on my Linux Mint 13 box for some years that depends upon https://github.com/ryazwinski/pythings.

I'm currently moving to a new Linux Mint 17 box, and I'm trying to move the program. I'm having a problem with installing python.py.

The package comes with a setup.py:

from setuptools import setup
setup(
name='pythings',
py_modules=['pythings'],
version='0.1',
description='Python Library for interfacing with Withings API',
install_requires=['simplejson', 'urllib2', 'hashlib'],
)

When I run the install (sudo python setup.py install) I get an error:

Could not find suitable distribution for Requirement.parse('urllib2')

Any ideas on how I should proceed? Is there some repository that contains urllib2 that needs to be added to the setuptools configuration?  Is there some new library that has supplanted urllib2?

Help would be appreciated.


 0
jdege
2/24/2016 2:02:07 PM
comp.lang.python 77058 articles. 6 followers.

2 Replies
3858 Views

Similar Articles

[PageSpeed] 45

On 24/02/2016 14:02, jdege@jdege.us wrote:
> I've been running a simple python program on my Linux Mint 13 box for some years that depends upon https://github.com/ryazwinski/pythings.
>
> I'm currently moving to a new Linux Mint 17 box, and I'm trying to move the program. I'm having a problem with installing python.py.
>
> The package comes with a setup.py:
>
>      from setuptools import setup
>      setup(
>          name='pythings',
>          py_modules=['pythings'],
>          version='0.1',
>          description='Python Library for interfacing with Withings API',
>          install_requires=['simplejson', 'urllib2', 'hashlib'],
>      )
>
>
> When I run the install (sudo python setup.py install) I get an error:
>
>      Could not find suitable distribution for Requirement.parse('urllib2')
>
> Any ideas on how I should proceed? Is there some repository that contains urllib2 that needs to be added to the setuptools configuration?  Is there some new library that has supplanted urllib2?
>
> Help would be appreciated.
>

I'll guess that your new OS is running Python 3 by default, in which
case urllib2 has gone.  If I'm correct you should to be able to run the
code through 2to3.

--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence


 0
Mark
2/24/2016 2:26:28 PM
jdege@jdege.us wrote:

> I've been running a simple python program on my Linux Mint 13 box for some
> years that depends upon https://github.com/ryazwinski/pythings.
>
> I'm currently moving to a new Linux Mint 17 box, and I'm trying to move
> the program. I'm having a problem with installing python.py.
>
> The package comes with a setup.py:
>
>     from setuptools import setup
>     setup(
>         name='pythings',
>         py_modules=['pythings'],
>         version='0.1',
>         description='Python Library for interfacing with Withings API',
>         install_requires=['simplejson', 'urllib2', 'hashlib'],
>     )
>
>
> When I run the install (sudo python setup.py install) I get an error:
>
>     Could not find suitable distribution for Requirement.parse('urllib2')
>
> Any ideas on how I should proceed? Is there some repository that contains
> urllib2 that needs to be added to the setuptools configuration?  Is there
> some new library that has supplanted urllib2?
>
> Help would be appreciated.

If you are using Python 2 try replacing

>         install_requires=['simplejson', 'urllib2', 'hashlib'],

with
install_requires=['simplejson'],

as the last two dependencies are probably already satisfied by the standard
library.


 0
Peter
2/24/2016 2:45:40 PM

Similar Artilces:

Parse error: parse error, expecting ','' or ';''
I'm getting the following error Parse error: parse error, expecting ','' or ';'' in /home/notarywe/public_html/php/update2.php on line 108 Here is line 108 <input type="text" name="ud_first" value="<? echo "$first" size="20"?>"></td> Any help would be appreciated. On 3-Aug-2003, "entoone" <entoone@pacbell.net> wrote: > I'm getting the following error Parse error: parse error, expecting ','' > or > ';'' in /home/notarywe/public_html/php/update2.php on line 108 > > Here is line 108 > > <input type="text" name="ud_first" value="<? echo "$first" > size="20"?>"></td> Please cross post instead of posting the same message separately to multiple news groups. The problem is your php statement <? echo "$first" size="20"?> is incorrect. The correct syntax for it would be: <? echo "$first size=\"20\"" ?> but I doubt that's what you want. try: <input type="text" name="ud_first" value="<? echo "$first"; ?>" size="20"></td> -- Tom Thackrey www.creative-light.com Tom Thackrey wrote: > On 3-Aug-2003, "entoone" <entoone@pacbell.net> wrote: > > >>I'm getting the f... '^=' and '~='? Hello, What is the difference between '^=' and '~='? Thanks, Duckhye ... 'is not' or '!=' A newbie question to you; what is the difference between statements like: if x is not None: and if x != None: Without any context, which one should be preferred? IMHO, the latter is more readable. On 2014-08-18 21:35, ElChino wrote: > A newbie question to you; what is the difference between statements > like: > if x is not None: > and > if x != None: > > Without any context, which one should be preferred? > IMHO, the latter is more readable. > "x == y" tells you whether x and y refer to objects that are equal. "x is y" tells you whether x and y actually refer to the same object. In the case of singletons like None (there's only one None object), it's better to use "is". "ElChino" <elchino@cnn.cn>: > A newbie question to you; what is the difference between statements > like: > if x is not None: > and > if x != None: Do the following: take two$10 bills. Hold one bill in the left hand, hold the other bill in the right hand. Now, the bill in the left hand "is not" the bill in the right hand. However, the bill in the left hand "==" the bill in the right hand. > Without any context, which one should be preferred? > IMHO, the latter is more readable. In almost all cases, both tests would result in the same behavior. However, the "is not" test is conceptually the correct one since you want...

more efficient 'find' with 'and'
Hi, I have the following code, but it runs quite slowly: for k=1:1000 a=find(and((b(:,1)==c(k)),(b(:,2)==d(k)))); end Is there a more efficient method? Thanks for your help. Dave Brackett wrote: > Hi, I have the following code, but it runs quite slowly: > > for k=1:1000 > a=find(and((b(:,1)==c(k)),(b(:,2)==d(k)))); > end > > Is there a more efficient method? I will assume for this discussion that you do something with "a" inside the loop: if you do not, then "a" will be the same as if you had only done k=1000 You could try t...

'''''''''''''The Running Update/Append Queries Using VBA code Ordeal''''''''''''''
Hello fellow programmers, I am trying to run an append/update query from code, a command button on a form initiates the queries. the format i am using is; _____________________________________________________ SELECT "criteria" FROM "criteria" WHERE "criteria" UPDATE/APPEND "field selections" RecordSource "qryExample" = above text strings" _______________________________________________________________________ When i am running a SELECT query in this manner it works fine with no problems, and accepts the values of specified linked form fields. This never works when doing an APPEND/UPDATE query. It can never find the values of linked form fields, Access always asks for the parameter value of the field(s) in question, or Access comes up with an error 3323 - No recordset. I am sure there are other people that have had this problem. What is the difference between Select queries and append/update queries? the append/update queries never seem to be able to find values in linked form fields. Can anyone shed any light on this or point to a knowledgebase Item, or even recommend a book focusing on this subject, I will go and buy it now. I have been for up 2 nights trying to acomplish this and now considering suicide, please help. Thanks In advance, Aaron. I know of two ways you can accomplish this. 1. You can create the SQL script for you append or update query and run the script with DoCmd.RunSQL. 2. You can create a...

'use' changed to 'require'
Hi I've changed use Socket; to require Socket; in a subroutine since I use it infrequently I'm getting the error message Bareword "AF_INET" not allowed while "strict subs" What have I done? Regards John "John" <john1949@yahoo.com> wrote: >I've changed >use Socket; >to >require Socket; > >in a subroutine since I use it infrequently > >I'm getting the error message > >Bareword "AF_INET" not allowed while "strict subs" > >What have I done? Isn't that obvious? You changed use...

'''''''''''''The Running Update/Append Queries Using VBA code Ordeal'''''''''''''' #2

if str_mo not in ('','.') and str_da not in ('','.') and str_yy not in ('','.') Any shorter ?
Hi, there. =20 I'm just curious if it ever dawned on anybody how to abbreviate this line : if str_mo not in ('','.') and str_da not in ('','.') and str_yy not in ('','.')=20 =20 Igor Kurbeko Clinical Programmer Analyst 678 336 4328 ikurbeko@atherogenics.com =20 no brain no pain =20 how about: if not (str_mo in ('','.') or str_da in ('','.') or str_yy in ('','.')) OR if not (missing(str_mo) or missing(str_da) or missing(str_yy)) Eric On 22 Oct 03 21:13:37 GMT, ikurbeko@ATHER...

SuSE 9.1 / chkrootkit finds 'top' and 'find'
Hi, recently I did a fresh install of SuSE 9.1 Prof. Today I ran a chkrootkit using the Knoppix 3.4 CD (provided by magazine c't 4/2004). chkrootkit thinks that these files are infected: - top - find No other issues are found. top is contained in procps-3.2.1-4, find in findutils-4.1.7-860. On the running SuSE 9.1 system I did rpm -V procps-3.2.1-4 rpm -V findutils-4.1.7-860 and did not find any problems. Now I am confused. Please advice what I can / should do. Thanks for your help. Manfred Manfred Schneider wrote: > > Today I ran a...

A function with 'and' , 'not' , 'null' , 'car' and 'cdr'
What's this ? (defun enigma (x) (and (not (null x)) (or (null (car x)) (enigma (cdr x))))) "I suppose I should learn Lisp, but it seems so foreign." - Paul Graham, Nov 1983 On Wed, Oct 07 2015, CAI GENGYANG wrote: > What's this ? > > > (defun enigma (x) > (and (not (null x)) > (or (null (car x)) > (enigma (cdr x))))) Bad taste? It returns T if the list X contains nil as an element. It would be clearer to write (some #'null x). Helmut CAI GENGYANG ...

error: expected '=', ',', ';', 'asm' or '__attrib
Hi I'm trying to compile an ADC Driver & come acrosss the following error. I've no experience writing drivers before, and hence have no clue how to fix it. Hope someone out there has encountered the problem & suggesst a fix for the same. The Error is I get is : qadc.c: At top level: qadc.c:97: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'qadc_read' make: *** [qadc.o] Error 1 [root@localhost qadc]# ########################################################################### ADC Driver Code ########################################################################### #define MODULE #define __KERNEL__ #include <linux/config.h> #include <linux/module.h> #include <linux/kernel.h> /* printk */ #include <linux/fs.h> / #include <linux/errno.h> /* error codes */ #include <linux/types.h> /* size_t */ #include <linux/proc_fs.h> /* proc file system */ #include <linux/fcntl.h> #include <asm/system.h> /* cli, flags */ #include <asm/uaccess.h> /* copy from/to user */ /*Registers to get qadc access*/ volatile unsigned short * qadcmcr = (unsigned short *)0x40190000; volatile unsigned short * qacr0 = (unsigned short *)0x4019000a; volatile unsigned short * qacr1 = (unsigned short *)0x4019000c; volatile unsigned short * qacr2 = (unsigned short *)0x4019000e; volatile unsigned short * qasr0 = (unsigned short *)0x40190010; volatile unsigned short * qasr1...

error: expected '=', ',', ';', 'asm' or '__attrib
Hi I'm trying to compile an ADC Driver & come acrosss the following error. I've no experience writing drivers before, and hence have no clue how to fix it. Hope someone out there has encountered the problem & suggesst a fix for the same. The Error is I get is : qadc.c: At top level: qadc.c:97: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'qadc_read' make: *** [qadc.o] Error 1 [root@localhost qadc]# ########################################################################### ADC Driver Code ##...

gem require 'activerecord' or 'active_record'
Hi comp.lang.ruby I am doing my first thing with ActiveRecord (without Rails), and to help me out I have the 'Pro ActiveRecord' book from APress, which is a fine resource, except from one annoying thing; all pieces of sample code in the book uses the statement: require 'activerecord' which refuses to work on both my windows-ruby and ubuntu-ruby setups. Searching this group I learned that using the statement: require 'active_record' solves that problem. What am I missing? What's the difference between the two, and why is only one of them working on my code? ...

Difference between 'is' and '=='
Hey guys, this maybe a stupid question, but I can't seem to find the result anywhere online. When is the right time to use 'is' and when should we use '=='? Thanks alot~ mwql: >Hey guys, this maybe a stupid question, but I can't seem to find the >result anywhere online. When is the right time to use 'is' and when >should we use '=='? http://docs.python.org/ref/comparisons.html -- Ren� Pijlman mwql wrote: > Hey guys, this maybe a stupid question, but I can't seem to find the > result anywhere online. When is the right time to ...

Re: '^=' and '~='?
Duckhye, According to the doc ( http://xrl.us/befwjx ) they, and one other set of characters, and the mnemonic 'NE' all represent 'NOT EQUAL'. Art ------- On Wed, 11 Feb 2009 16:52:40 -0600, Duck-Hye Yang <dyang@CHAPINHALL.ORG> wrote: >Hello, >What is the difference between '^=' and '~='? > >Thanks, >Duckhye ...

logical to 'on' / 'off'
Hi, is there a function implemented doing this conversion? my Problem is, that I want to use the following code: set(handles.edit_curr_trq_sl,'Enable',get(hObject,'Value')) where get(hObject,'Value') gives the state of a checkbox thank you! function [str]=tf2oo(logic) switch logic case 0 str='off'; case 1 str='on'; end%switch end%function tf2oo() while i do not know a built in function, I use my own:) meisterbartsch wrote: > > > function [str]=tf2oo(logic) > switch logic > case 0 > str='off'; &g...

Can't find module named 'svn' in python
Hi, i have a simple test which tries to load 'svn' moddule. # python -c "from svn import client" Traceback (most recent call last): File "<string>", line 1, in ? ImportError: No module named svn I have checked I have sub-directories 'libsvn', 'svn' under /usr/local/lib/svn-python/ cd /usr/local/lib/svn-python/ [root@localhost svn-python]# ls libsvn svn But python still can't find it. Please tell me what am I missing. I appreciate your help. My first thought: Check if you have /usr/local/lib/svn-python/ in your PYTHONPATH environme...

'[OFF]' as in 'offensive'???
Hi, given that 'off-topicness' is indicated as '[OT]' and taking a look at those postings that started the threads indicated as '[OFF]' (which may both be seen as being somewhat offensive) may lead to the conclusion that '[OFF]' stands for offensiveness. I don't think that this is the intended meaning so what actually *does* '[OFF]' mean? I never came across that abbreviation before (although I have been around on the USENET for quite some time) but maybe it is worth knowing? Josef 'Jupp' Schugt NOTE: mails >100 KiB are ignored -- German edition of comp.lang.ruby FAQ - http://oss.erdfunkstelle.de/ruby/ Aurox Linux - http://qurl.net/7q | http://qurl.net/7r - Firefox Thunderbird - http://qurl.net/7s | http://qurl.net/7t - Liferea Enigmail - http://qurl.net/7u | http://qurl.net/7v - GnuPG [Josef 'Jupp' Schugt <jupp@gmx.de>, 2004-12-10 23.20 CET] > I don't think that this is the intended meaning so what actually *does* > '[OFF]' mean? Off-topic. ...

include path for 'load' or 'require'
Hi! Say I have a script called "gen.rb", and I would like it to load a script called "loadme.rb" because it provides a common routine used by a lot of scripts, but I don't want to install it anywhere in the search path... I just want to keep it with all the .rb files that actually use it... How do I specify the directory that 'this' current script is in? For example, I have: c:\src\gen.rb c:\src\loadme.rb where gen.rb is: -------------------------------------- #!/usr/bin/env ruby dir=File.dirname(__FILE__) load "#{dir}/loadme.rb" puts "__FILE__...

require 'active_support' or 'i18n' first ?
Hi all, I discovered recently a strange behavior. If I require 'i18n' gem then 'active_support' then everything is ok, if I change order - irb raises an exception: $irb ruby-1.9.2-p0 > require 'i18n' => true ruby-1.9.2-p0 > require 'active_support' => true ruby-1.9.2-p0 > exit eugen@eugen-hp:~$ \$ irb ruby-1.9.2-p0 > require 'active_support' => true ruby-1.9.2-p0 > require 'i18n' NameError: uninitialized constant Object::I18n from /home/eugen/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.1/lib/active_support/i18...

Does '!=' equivelent to 'is not'
I'm a bit confusing about whether "is not" equivelent to "!=" if a != b: ... if a is not b: ... What's the difference between "is not" and "!=" or they are the same thing? pirata wrote: > I'm a bit confusing about whether "is not" equivelent to "!=" > > if a != b: > ... > > if a is not b: > ... > > > What's the difference between "is not" and "!=" or they are the same thing? No, they are not the same thing. == and != test to see if the *value* of two variables are the same. Like so: >>> a = 'hello world' >>> b = 'hello world' >>> a == b True a and b both have the value of 'hello world', so they are equal is and is not, however, do not test for value equivalence, they test for object identity. In other words, they test to see if the object the two variables reference are the same object in memory, like so: >>> a is b False a and b are assigned to two different objects that happen to have the same value, but nevertheless there are two separate 'hello world' objects in memory, and therefore you cannot say that a *is* b Now look at this: >>> c = d = 'hello world' >>> c == d True >>> c is d True In this case, they are again the same value, but now the is test also shows that they are the same *object* as well, because...

Override 'and' and 'or'
Is it possible to override 'and' and/or 'or'? I cannot find a special method for it... __and__ and __rand__ and __or__ and __ror__ are for binary manipulation... any proposals? Have marvelous sunday, Marco Dekker <m.aschwanden@gmail.com> wrote: > Is it possible to override 'and' and/or 'or'? I cannot find a special > method for it... __and__ and __rand__ and __or__ and __ror__ are for > binary manipulation... any proposals? If you want to customize the truth value testing you have to implement __nonzero__ " __nonzero__( self) Call...

replacement for '{' and '}' ?
I am still playing around with what kind of syntax I would like to mark up my documents. Are there equivalent long substitutes for { and } when they are not used to describe arguments to functions? Something like \begin{group} and \end{group}. In other words, if I could force myself to write, say, \begin{group} \it ... \end{group} instead of {\it ... }, then I believe I could identify from the markup context what is an argument that belongs to a just invoked macro and what is text. {Of course, in this context, \textit{...} would be better.} No more ambiguity whether a in \myfunction{a} is an argument or just text. Is there a way to make latex barf when it sees an ordinary '{' in text, rather than \begin{group}, but not barf when I want it (to denote macro arguments)? Regards, /iaw On Aug 16, 6:01=A0pm, "ivo...@gmail.com" <ivo...@gmail.com> wrote: > Is there a way to make latex barf when it sees an ordinary '{' in > text, rather than \begin{group}, but not barf when I want it (to > denote macro arguments)? What do you mean exactly? I don't understand. Do you have in mind your- to-be-new-syntax or just regular latex? Cheers, Tomek ivowel@gmail.com wrote: > I am still playing around with what kind of syntax I would like to > mark up my documents. > > Are there equivalent long substitutes for { and } when they are not > used to describe arguments to functions? Something like \begin{group} > and \end{gr...

difference between ',' and 'a,'
Small question. In gforth is there a difference between the words ',' and 'a,'? I'm thinking not, so perhaps another question, why have both ',' and 'a,'? Thanks Should be the same, in gforth: see , : , here cell allot ! ; ok see a, : , here cell allot ! ; ok On Friday, January 9, 2015 at 5:46:04 AM UTC-8, beeflo wrote: > Small question. In gforth is there a difference between the words ',' and 'a,'? > > I'm thinking not, so perhaps another question, why have both ',' and 'a,'? > > Thanks beeflo <beeflobill@gmail.com> writes: >Small question. In gforth is there a difference between the words ',' and 'a,'? > >I'm thinking not, so perhaps another question, why have both ',' and 'a,'? In Gforth itself, there is no difference. In Gforth's cross compiler, "a," is there for addresses, and "," is there for other cells; addresses can then be relocated when loading the image. - anton -- M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html New standard: http://www.forth200x.org/forth200x.html EuroForth 2014: http://www.euroforth.org/ef14/ ...

Web resources about - Could not find suitable distribution for Requirement.parse('urllib2') - comp.lang.python

Resources last updated: 3/29/2016 1:14:26 AM