Re: Cannot install pkg_resources using pip

2023-04-17 Thread Peter J. Holzer
On 2023-04-16 17:03:43 -0400, Thomas Passin wrote:
> On 4/16/2023 4:42 PM, Rich Shepard wrote:
> > Python3-3.9.10 installed on this Slackware64-14.2 desktop.
[...]
> > # pip install setuptools
> > bash: /usr/bin/pip: /usr/bin/python3.7: bad interpreter: No such file or
> > directory
> > 
> > There is no python3.7 here:
> > # ls /usr/bin/python3.7
> > ls: cannot access '/usr/bin/python3.7': No such file or directory
> > 
> > How do I clean this up?
> 
> What is there to clean up?

There is a version of pip installed for a version of python which isn't
installed. That's definitely not useful, so it should be cleaned up.

As to how to do that:

Find out which package /usr/bin/pip belongs to and deinstall or upgrade
this package. How to find that package is a Slackware question, not a
Python question. And since Rich wrote that he's been comfortably using
Slackware for 20 years, I'll trust that he knows how to do that and just
needed a little nudge into the right direction.

hp

-- 
   _  | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| |   | h...@hjp.at |-- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |   challenge!"


signature.asc
Description: PGP signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Cannot install pkg_resources using pip

2023-04-17 Thread Rich Shepard

On Mon, 17 Apr 2023, aapost wrote:


Slackware isn't as straight forward in it's management as other distros
(not standardized anyway).


I've used Slackware for 20 years; it's completely rationale and comfortable
for me. :-)


That being said, if you start from python source ...


If worse came to worse, I'd reinstall the distro package.

Thanks,

Rich
--
https://mail.python.org/mailman/listinfo/python-list


Re: Cannot install pkg_resources using pip [RESOLVED]

2023-04-17 Thread Rich Shepard

On Sun, 16 Apr 2023, Rich Shepard wrote:


How do I clean this up?


My thanks for the suggestions and ideas you sent me on this issue. I've
resolved it by not trying to build pulseaudio-equalizer. I don't need it
because I learned this morning that my Yamaha CM500 headset clearly heard
the Zoom audio test tones and voices on a YouTube video.

I'm testing the headset on a Zoom call this afternoon with a friend.
Assuming it works with the meeting as it did on the Zoom test I'll use it
for Zoom and Jitsi meetings and use the Marantz Pro mic and Panasonic
headphones for recording web tutorials and podcasts.

Regards,

Rich
--
https://mail.python.org/mailman/listinfo/python-list


Re: Cannot install pkg_resources using pip

2023-04-17 Thread aapost

On 4/17/23 08:45, Rich Shepard wrote:

On Sun, 16 Apr 2023, Thomas Passin wrote:


Slackware isn't as straight forward in it's management as other distros 
(not standardized anyway). If this is someone elses install I would be 
cautious in using any advice I am providing, as it would be better for 
someone with familiarity with how they want the device set up to address 
the issues (such as if they prefer using some sort of package scheme or 
if doing everything from source is ok).


That being said, if you start from python source (as in overwriting what 
is currently there and doing a fresh reinstall), you can download 
Python3.9, then run

./configure
make
make install

after doing that, verify (python may still link to something old, that 
may be ok in this case, but good to note)

python --version
python3 --version
python3.9 --version

pkg_resources is inside of setuptools

so you would run
python3.9 -m pip install setuptools
(might already be there with the reinstall)

after that run
python3.9

then run
import pkg_resources
import setuptools
to see if you get errors or successful imports

if they import successfully, attempt to reinstall meson and ninja 
against your fresh python install

python3.9 -m pip install meson
python3.9 -m pip install ninja

verify versions with
meson -v
ninja --version

Then follow the instructions of the meson package from there (you 
mentioned some sort of pulseaudio-equalizer, depending on your desktop 
environment, you may run in to additional issues depending on how your 
slackware is setup).


--
https://mail.python.org/mailman/listinfo/python-list


Re: Cannot install pkg_resources using pip

2023-04-17 Thread Rich Shepard

On Sun, 16 Apr 2023, Thomas Passin wrote:


Sorry, Rich, I've never dealt with this so someone else will have to give
suggestions.


Thomas,

This is all new to me, too.


I would try to see if there are any versions available. It could be that
meson says it needs version x but only version y > x is available. Pip
will quit but meson may very well work with the available version anyway.
So I would try to install pkg_resources on its own, and then see if the
meson build can succeed. No guarantees, but I've seen this work before. So
python3.9 -m pip install --user pkg_resources

Or, to see what versions if any are available:
python3.9 -m pip install --user pkg_resources==
# NO spaces allowed before the "==".


Thank you. I'll give this a try.

Regards,

Rich
--
https://mail.python.org/mailman/listinfo/python-list


Re: Cannot install pkg_resources using pip

2023-04-16 Thread Thomas Passin

On 4/16/2023 6:27 PM, Rich Shepard wrote:
If pip has not been installed (very possible on Linux), then you will 
need to get it.  If python3.9 is not the system-upgraded version, then 
do an internet search for "linux python install pip". There's a pip 
website that has an installer for it. I never remember what it's 
called, so I always have to search for it myself.


https://www.redhat.com/sysadmin/install-python-pip-linux

I'll download the installer from ther.


The page I was thinking of is

https://pip.pypa.io/en/stable/installation/

I found it by an internet search for "pip installer".  It covers several 
ways to install pip on Linux, MacOS, and Windows. On Linux, use it for 
Python installations that were *not* installed by the system.  Use the 
package manager if the Python installation or upgrade *was* installed by 
the system.


That Redhat link basically uses the pypa.io instructions.
--
https://mail.python.org/mailman/listinfo/python-list


Re: Cannot install pkg_resources using pip

2023-04-16 Thread Thomas Passin

On 4/16/2023 6:34 PM, Rich Shepard wrote:

On Sun, 16 Apr 2023, Rich Shepard wrote:


I'll download the installer from there.


But, I still cannot install the pkg_resources module that meson wants to
start the build of pulseaudio-equalizer:
# pip install pkg_resources
ERROR: Could not find a version that satisfies the requirement 
pkg_resources (from versions: none)

ERROR: No matching distribution found for pkg_resources

Rich



Sorry, Rich, I've never dealt with this so someone else will have to 
give suggestions.


I would try to see if there are any versions available.  It could be 
that meson says it needs version x but only version y > x is available. 
Pip will quit but meson may very well work with the available version 
anyway.  So I would try to install pkg_resources on its own, and then 
see if the meson build can succeed.  No guarantees, but I've seen this 
work before.  So


python3.9 -m pip install --user pkg_resources

Or, to see what versions if any are available:

python3.9 -m pip install --user pkg_resources==
# NO spaces allowed before the "==".

There is a pip option to ignore the version specification and just leave 
the existing package installed as is, and this could help if the full 
installation wants to downgrade the pgk_resources that you just installed.


You can also use the --dry-run option to see what would happen without 
actually changing anything.

--
https://mail.python.org/mailman/listinfo/python-list


Re: Cannot install pkg_resources using pip

2023-04-16 Thread Thomas Passin

On 4/16/2023 6:27 PM, Rich Shepard wrote:

On Sun, 16 Apr 2023, Thomas Passin wrote:

[snip]



It should have been installed with the upgrade to 3.9.10


In my experience, on Windows pip is always included but on Linux hardly 
ever.  I have always needed to install the system installer pip package 
or get it from the pip site, depending, as I wrote earlier, on whether 
your version of Python was installed by the system or not.


[I'm no great Linux expert but I've had to go through this for probably 
a dozen VMs over the last few years].

--
https://mail.python.org/mailman/listinfo/python-list


Re: Cannot install pkg_resources using pip

2023-04-16 Thread Rich Shepard

On Sun, 16 Apr 2023, Rich Shepard wrote:


I'll download the installer from there.


But, I still cannot install the pkg_resources module that meson wants to
start the build of pulseaudio-equalizer:
# pip install pkg_resources
ERROR: Could not find a version that satisfies the requirement pkg_resources 
(from versions: none)
ERROR: No matching distribution found for pkg_resources

Rich

--
https://mail.python.org/mailman/listinfo/python-list


Re: Cannot install pkg_resources using pip

2023-04-16 Thread Rich Shepard

On Sun, 16 Apr 2023, Thomas Passin wrote:


It worked then because your path found a pip script. When there are more
than one Python installations, it can be unclear which one will get run,
depending on how the path got set up after the last version was installed.


Thomas,

I probably last used pip with a python-3.7 version.


To check your version of Python, run
python3 -V


$ python3 -V
Python 3.9.10


Then try to run pip:
python3.9 -m pip


$ python3.9 -m pip
/usr/bin/python3.9: No module named pip

If pip has not been installed (very possible on Linux), then you will need to 
get it.  If python3.9 is not the system-upgraded version, then do an internet 
search for "linux python install pip". There's a pip website that has an 
installer for it. I never remember what it's called, so I always have to 
search for it myself.


https://www.redhat.com/sysadmin/install-python-pip-linux

I'll download the installer from ther.

If it appears that python3.9 *is* the version installed by the system, then 
use the system installer to install the right version of pip - as I said 
above, the package name can vary across distros.


It should have been installed with the upgrade to 3.9.10


Your message doesn't seem to have been copied to the mailing list. If you
don't mind, it could help other people if you copied it and this reply to
the list.


I always respond to the mail list if that's the 'reply to' address.
Sometimes I don't check the address used in my reply, assuming it's correct.

Thanks,

Rich
--
https://mail.python.org/mailman/listinfo/python-list


Re: Cannot install pkg_resources using pip

2023-04-16 Thread Thomas Passin

On 4/16/2023 4:42 PM, Rich Shepard wrote:

Python3-3.9.10 installed on this Slackware64-14.2 desktop. Trying to run
meson to build an application I'm told it's missing pkg_resources, which is
part of setuptools. The command fails:
# pip install setuptools
bash: /usr/bin/pip: /usr/bin/python3.7: bad interpreter: No such file or 
directory


There is no python3.7 here:
# ls /usr/bin/python3.7
ls: cannot access '/usr/bin/python3.7': No such file or directory

How do I clean this up?


What is there to clean up?  If you have Python 3.9 installed, why are 
you fooling around trying to run Python 3.7? It seems you are not 
telling us something ...


It's better to always run pip with the version of Python that you intend 
to use.  If that is launched when you type "python3", then run pip this way:


python3 -m pip

If instead you want to use, say, python3.9, then type this:

python3.9 -m pip

--
https://mail.python.org/mailman/listinfo/python-list


Cannot install pkg_resources using pip

2023-04-16 Thread Rich Shepard

Python3-3.9.10 installed on this Slackware64-14.2 desktop. Trying to run
meson to build an application I'm told it's missing pkg_resources, which is
part of setuptools. The command fails:
# pip install setuptools
bash: /usr/bin/pip: /usr/bin/python3.7: bad interpreter: No such file or 
directory

There is no python3.7 here:
# ls /usr/bin/python3.7
ls: cannot access '/usr/bin/python3.7': No such file or directory

How do I clean this up?

TIA,

Rich
--
https://mail.python.org/mailman/listinfo/python-list


[issue24907] Module location load order is not respected if pkg_resources is imported and a namespace is declared

2021-06-20 Thread Irit Katriel


Irit Katriel  added the comment:

2.7 is past EOL and I could not reproduce this on a current python version. 
Please create a new issue if you are still having a problem with this on 3.9+.

PS C:\Users\User\src\cpython-dev> .\python.bat
Running Release|x64 interpreter...
Python 3.11.0a0 (heads/main-dirty:09eb817115, Jun 20 2021, 16:50:29) [MSC 
v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> with open('json/__init__.py', 'w') as f:
...f.write("__import__('pkg_resources').declare_namespace(__name__); 
print('test')")
...
70
>>> quit()
PS C:\Users\User\src\cpython-dev> python -c 'import json; print( json.__file__)'
Running Release|x64 interpreter...
test
C:\Users\User\src\cpython-dev\json\__init__.py

--
nosy: +iritkatriel
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue24907>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42744] pkg_resources seems to treat python 3.10 as python 3.1

2021-02-10 Thread RhinosF1


RhinosF1  added the comment:

Thanks. Very likely!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42744] pkg_resources seems to treat python 3.10 as python 3.1

2021-02-10 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

setuptools and pip were upgraded in alpha 5 which could have fixed this : 
https://github.com/python/cpython/commit/4d11ecbb5ed78e6259ee27289c7638aad795f473

--
nosy: +xtreak

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42744] pkg_resources seems to treat python 3.10 as python 3.1

2021-02-10 Thread RhinosF1


Change by RhinosF1 :


--
type: compile error -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42744] pkg_resources seems to treat python 3.10 as python 3.1

2021-02-10 Thread RhinosF1


RhinosF1  added the comment:

Can't seem to reproduce on alpha 5.

https://github.com/MirahezeBots/MirahezeBots/pull/431/checks?check_run_id=1873007567

https://github.com/python/cpython/compare/v3.10.0a3...v3.10.0a5 doesn't load 
for me so not sure when it was fixed.

--
resolution:  -> fixed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42744] pkg_resources seems to treat python 3.10 as python 3.1

2021-02-10 Thread RhinosF1


RhinosF1  added the comment:

Adding log before it gets cleaned up as too old.

2020-12-25T17:42:03.0730305Z Traceback (most recent call last):
2020-12-25T17:42:03.0733282Z   File 
"/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py",
 line 584, in _build_master
2020-12-25T17:42:03.0736279Z ws.require(__requires__)
2020-12-25T17:42:03.0737901Z   File 
"/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py",
 line 901, in require
2020-12-25T17:42:03.0739330Z needed = 
self.resolve(parse_requirements(requirements))
2020-12-25T17:42:03.0742242Z   File 
"/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py",
 line 792, in resolve
2020-12-25T17:42:03.0744366Z raise VersionConflict(dist, 
req).with_context(dependent_req)
2020-12-25T17:42:03.0747963Z pkg_resources.ContextualVersionConflict: (geoip2 
4.1.0 
(/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages), 
Requirement.parse('geoip2<3.0'), {'sopel'})
2020-12-25T17:42:03.0754140Z 
2020-12-25T17:42:03.0754883Z During handling of the above exception, another 
exception occurred:
2020-12-25T17:42:03.0755487Z 
2020-12-25T17:42:03.0756004Z Traceback (most recent call last):
2020-12-25T17:42:03.0757250Z   File 
"/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/bin/sopel", line 6, in 
2020-12-25T17:42:03.0758216Z from pkg_resources import load_entry_point
2020-12-25T17:42:03.0759775Z   File 
"/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py",
 line 3262, in 
2020-12-25T17:42:03.0760984Z def _initialize_master_working_set():
2020-12-25T17:42:03.0762804Z   File 
"/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py",
 line 3245, in _call_aside
2020-12-25T17:42:03.0763832Z f(*args, **kwargs)
2020-12-25T17:42:03.0765396Z   File 
"/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py",
 line 3274, in _initialize_master_working_set
2020-12-25T17:42:03.078Z working_set = WorkingSet._build_master()
2020-12-25T17:42:03.0768222Z   File 
"/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py",
 line 586, in _build_master
2020-12-25T17:42:03.0769460Z return 
cls._build_from_requirements(__requires__)
2020-12-25T17:42:03.0771154Z   File 
"/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py",
 line 599, in _build_from_requirements
2020-12-25T17:42:03.0772389Z dists = ws.resolve(reqs, Environment())
2020-12-25T17:42:03.0773911Z   File 
"/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py",
 line 787, in resolve
2020-12-25T17:42:03.0775227Z raise DistributionNotFound(req, requirers)
2020-12-25T17:42:03.0776843Z pkg_resources.DistributionNotFound: The 
'geoip2<3.0' distribution was not found and is required by sopel
2020-12-25T17:42:03.0924206Z ##[error]Process completed with exit code 1.

--

___
Python tracker 
<https://bugs.python.org/issue42744>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42744] pkg_resources seems to treat python 3.10 as python 3.1

2020-12-25 Thread RhinosF1


New submission from RhinosF1 :

As seen in 
https://github.com/MirahezeBots/MirahezeBots/pull/380/checks?check_run_id=1609121656,
 pkg_resources is throwing errors about version conflicts as it seems it thinks 
3.10 is 3.1 or similar. This was fixed for PyPA/Pip in 
https://github.com/pypa/pip/issues/6730 so it installs from pip fine.

--
components: Installation
messages: 383760
nosy: RhinosF1
priority: normal
severity: normal
status: open
title: pkg_resources seems to treat python 3.10 as python 3.1
type: compile error
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue42744>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24907] Module location load order is not respected if pkg_resources is imported and a namespace is declared

2015-08-24 Thread Vadim Kantorov

Vadim Kantorov added the comment:

From my (novice) standpoint, it's very weird that importing pkg_resources in a 
module's __init__.py causes Python to deviate from its core module import 
rules / sequence.

Would you consider reporting this issue to pkg_resources's authors more 
appropriate?

--
status: pending - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24907
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24907] Module location load order is not respected if pkg_resources is imported and a namespace is declared

2015-08-24 Thread R. David Murray

R. David Murray added the comment:

Yes, unless you can identify a python bug yourself.  I believe pkg_resources 
does a bunch of imports when it is imported, so I'm not really surprised that 
it has an effect on the order in which things are imported.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24907
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24907] Module location load order is not respected if pkg_resources is imported and a namespace is declared

2015-08-24 Thread R. David Murray

R. David Murray added the comment:

To be clear: I believe it imports things that are not in the standard library, 
based on scanning sys.path.  But I haven't studied the code in depth, so I 
could be wrong.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24907
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24907] Module location load order is not respected if pkg_resources is imported and a namespace is declared

2015-08-21 Thread R. David Murray

R. David Murray added the comment:

pkg_resources is 3rd party code (from the point of view of this tracker).  If 
you are saying its code is revealing a bug in python, can you expand on what 
exactly the bug is?

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24907
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24907] Module location load order is not respected if pkg_resources is imported and a namespace is declared

2015-08-21 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
status: open - pending

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24907
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24907] Module location load order is not respected if pkg_resources is imported and a namespace is declared

2015-08-21 Thread Vadim Kantorov

New submission from Vadim Kantorov:

If module's __init__.py contains 
__import__('pkg_resources').declare_namespace(__name__), the module is not 
loaded, even though it's located in the current directory and should mask other 
modules.

Originally I stumbled upon this issue while installing a new version of Google 
Protobuf. But here's a simpler repro:

$ python -c 'import json; print json.__file__'
/usr/lib/python2.7/json/__init__.pyc

$ mkdir json; echo print 'test'  json/__init__.py
$ python -c 'import json; print json.__file__'
test
json/__init__.py

$ echo __import__('pkg_resources').declare_namespace(__name__); print 'test' 
 json/__init__.py
$ python -c 'import json; print json.__file__'
test
/usr/lib/python2.7/json/__init__.pyc

For Protobuf, if you build Python bindings from sources, the google/__init__.py 
will contain exactly __import__('pkg_resources').declare_namespace(__name__) 
and it prevents the freshly-built module from being loaded, even if the module 
egg is at the first place in sys.path. So an older version gets loaded and it 
screws things up.

Ubuntu 14.10, Python 2.7.8

--
components: Extension Modules
messages: 248948
nosy: Vadim Kantorov
priority: normal
severity: normal
status: open
title: Module location load order is not respected if pkg_resources is imported 
and a namespace is declared
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24907
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Problems with pkg_resources

2013-06-20 Thread Skip Montanaro
I'm trying to get setup to work on pylint source.  I've installed
pylint, logilab-common and astroid in the usual manner, specifying
--user to get them into my private space:

python setup.py install --user

If I attempt to import astroid from a Python prompt, everything's
fine:

% PYTHONPATH=/home/skipm/.local/lib/python2.7/site-packages python
Python 2.7.2 (default, Oct 17 2012, 03:11:33)
[GCC 4.4.6 [TWW]] on sunos5
Type help, copyright, credits or license for more information.
 import astroid
 astroid.__file__
'/home/skipm/.local/lib/python2.7/site-packages/astroid-0.24.3-py2.7.egg/astroid/__init__.pyc'

but pylint can't find it:

% PYTHONPATH=/home/skipm/3rdParty/astroid pylint Traceback (most
recent call last):
  File /home/skipm/.local/bin/pylint, line 6, in module
from pkg_resources import load_entry_point
  File /opt/TWWfsw/distribute06/lib/python27/pkg_resources.py, line
2709, in module
working_set.require(__requires__)
  File /opt/TWWfsw/distribute06/lib/python27/pkg_resources.py, line
686, in require
needed = self.resolve(parse_requirements(requirements))
  File /opt/TWWfsw/distribute06/lib/python27/pkg_resources.py, line
584, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: logilab-astroid=0.24.3

How do I work around this problem?  I'd rather be hacking on pylint
than struggling with distutils.

Thx,

Skip
-- 
http://mail.python.org/mailman/listinfo/python-list


pkg_resources ?

2011-06-14 Thread km
Hi all,

I am trying to  look at the source code of a python  script (run.py). But
it  reads
###code - run.py 
#!/usr/bin/env python
# EASY-INSTALL-SCRIPT: 'pbpy==0.1','run.py'
__requires__ = 'pbpy==0.1'
import pkg_resources
pkg_resources.run_script('pbpy==0.1', 'run.py')
##code #

What are the advantages of using pkg_resources stuff ?

Thanks
Regards,
KM
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: pkg_resources ?

2011-06-14 Thread Ned Deily
In article BANLkTi=-=jjlk_4awqgna3h7kv3aa9y...@mail.gmail.com,
 km srikrishnamo...@gmail.com wrote:
 I am trying to  look at the source code of a python  script (run.py). But
 it  reads
 ###code - run.py 
 #!/usr/bin/env python
 # EASY-INSTALL-SCRIPT: 'pbpy==0.1','run.py'
 __requires__ = 'pbpy==0.1'
 import pkg_resources
 pkg_resources.run_script('pbpy==0.1', 'run.py')
 ##code #
 
 What are the advantages of using pkg_resources stuff ?

What you are seeing is boiler-plate code automatically generated by 
setuptools (or the Distribute clone of setuptools) when a script is 
installed with easy_install.  The main reason for the wrapper is to 
allow multiple versions of a Python package (in the PyPi sense) to be 
installed in one Python instance.  There's more information here: 
http://peak.telecommunity.com/DevCenter/setuptools

-- 
 Ned Deily,
 n...@acm.org

-- 
http://mail.python.org/mailman/listinfo/python-list


[issue11091] Bug with reimport in pkg_resources

2011-02-01 Thread Сергей Чупраков

New submission from Сергей Чупраков sergey...@gmail.com:

import pkg_resources change path of already imported module
this break google appengine because It use google.__file__ to determine sdk 
directory.

Ubuntu 10.10
~/lib/google_appengine$ python
Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) 
[GCC 4.4.5] on linux2
Type help, copyright, credits or license for more information.
 from appcfg import fix_sys_path
 fix_sys_path()
 import google
 google
module 'google' from 
'/home/schuprakov/lib/google_appengine/google/__init__.pyc'
 import pkg_resources
 google
module 'google' from '/usr/lib/pymodules/python2.6/google/__init__.pyc'
 


ls /usr/lib/pymodules/python2.6/google/
__init__.py  __init__.pyc  protobuf

--
messages: 127704
nosy: Сергей.Чупраков
priority: normal
severity: normal
status: open
title: Bug with reimport in pkg_resources
type: resource usage

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11091
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11091] Bug with reimport in pkg_resources

2011-02-01 Thread Сергей Чупраков

Changes by Сергей Чупраков sergey...@gmail.com:


--
components: +Build
versions: +Python 2.5, Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11091
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11091] Bug with reimport in pkg_resources

2011-02-01 Thread Сергей Чупраков

Changes by Сергей Чупраков sergey...@gmail.com:


--
components:  -Build

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11091
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11091] Bug with reimport in pkg_resources

2011-02-01 Thread Сергей Чупраков

Changes by Сергей Чупраков sergey...@gmail.com:


--
components: +Library (Lib)

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11091
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11091] Bug with reimport in pkg_resources

2011-02-01 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

pkg_resources is not from Python but setuptools; you probably installed it and 
forgot it was there. I would suggest you do your App Engine development using 
virtualenv to make sure that you are working in a clean environment.

--
nosy: +brett.cannon
resolution:  - invalid
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11091
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



running pkg_resources from a compiled py2exe prog ram

2009-04-15 Thread David Lyon
Hi,

I'm trying to make an exe that uses pkg_resources.

Every time I try to run the compiled version it always fails complaining
that it is missing pkg_resources.


Traceback (most recent call last):
  File PythonPackageManager.py, line 6, in module
import MainWindow
  File MainWindow.pyc, line 16, in module

  File Packaging.pyc, line 9, in module

ImportError: No module named pkg_resources

This only happens in the .exe version. It runs fine without compilation.

Any ideas?

David

--
http://mail.python.org/mailman/listinfo/python-list


running pkg_resources from a compiled py2exe prog ram

2009-04-15 Thread David Lyon

btw

the code is just..


import ConfigParser
import zipfile
import os
import subprocess
import getopt, sys
import os.path
import _winreg
import pkg_resources



--
http://mail.python.org/mailman/listinfo/python-list


where is pkg_resources (setuptools) looking for entry_points.txt

2007-10-01 Thread seb . haase
Hi,
I'm trying to use an egg packages (pyOpenGL)  as a normal
package (by unzipping the egg into a directory).
Generally this seems to work fine, except one init-step is missing.

From setuptools I got the pkg_resources.py file.
But now the package is not properly initialized, because
iter_entry_points() in pkg_resources  does not find the corresponding
entry_points.txt file needed to setup some intial configuration...
(array handlers for pyOpenGL)

Is there a default directory name or an environment variably or maybe
the (ominous? ) __main__.__require  variable  that I can use to have
the entry_points text read ?

(I would even be willing to manually  load the entry_points.txt file
and feed it into some pkg_resources related variable to make it happy
[before I import my package] )

Thanks,
Sebastian Haase

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: where is pkg_resources (setuptools) looking for entry_points.txt

2007-10-01 Thread Robert Kern
[EMAIL PROTECTED] wrote:
 Hi,
 I'm trying to use an egg packages (pyOpenGL)  as a normal
 package (by unzipping the egg into a directory).
 Generally this seems to work fine, except one init-step is missing.

The EGG-INFO/ directory in the zipped egg needs to be renamed to something
appropriate, in this case:

  PyOpenGL-3.0.0a6-py2.5.egg-info/

The documentation for such things is here:

  http://peak.telecommunity.com/DevCenter/PkgResources
  http://peak.telecommunity.com/DevCenter/setuptools
  http://peak.telecommunity.com/DevCenter/EasyInstall

and the mailing list for setuptools questions is the Distutils-SIG:

  http://mail.python.org/mailman/listinfo/distutils-sig/

-- 
Robert Kern

I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth.
  -- Umberto Eco

-- 
http://mail.python.org/mailman/listinfo/python-list