pkg_resources.DistributionNotFound when running pcreate

94 views
Skip to first unread message

Michael

unread,
Apr 16, 2014, 12:07:05 AM4/16/14
to pylons-...@googlegroups.com
after creating a new virtualenv and installing pyramid via easy_install, I simply call `pcreate` and I get this error:
 
pkg_resources.DistributionNotFound: pyramid==1.5a2

any ideas why? Python 2.7.3 Log follows:


[michael@varga (Tue Apr 15 23:47:39) ~/src/py]% virtualenv test_env
New python executable in test_env/bin/python
Installing Setuptools...................................................................................................................................................................................................................................done.
Installing Pip.............................................................c.............................................................d...........................................................................................................................................................................................................done.
[michael@varga (Tue Apr 15 23:47:52) ~/src/py]% cd test_env 
[michael@varga (Tue Apr 15 23:47:55) ~/src/py/test_env]% source bin/activate
(test_env)[michael@varga (Tue Apr 15 23:48:25) ~/src/py/test_env]% easy_install pyramid
Searching for pyramid
Best match: pyramid 1.5
Processing pyramid-1.5.tar.gz
Writing /var/folders/dl/fxytxtf15zgc51n2rffrbdgh0000gn/T/easy_install-dm5Nqn/pyramid-1.5/setup.cfg
Running pyramid-1.5/setup.py -q bdist_egg --dist-dir /var/folders/dl/fxytxtf15zgc51n2rffrbdgh0000gn/T/easy_install-dm5Nqn/pyramid-1.5/egg-dist-tmp-2Wf3FA
Adding pyramid 1.5 to easy-install.pth file
Installing ptweens script to /Users/michael/src/py/test_env/bin
Installing pdistreport script to /Users/michael/src/py/test_env/bin
Installing proutes script to /Users/michael/src/py/test_env/bin
Installing pshell script to /Users/michael/src/py/test_env/bin
Installing prequest script to /Users/michael/src/py/test_env/bin
Installing pviews script to /Users/michael/src/py/test_env/bin
Installing pcreate script to /Users/michael/src/py/test_env/bin
Installing pserve script to /Users/michael/src/py/test_env/bin

Installed /Users/michael/src/py/test_env/lib/python2.7/site-packages/pyramid-1.5-py2.7.egg
Processing dependencies for pyramid
Searching for WebOb>=1.3.1
Best match: WebOb 1.3.1
Processing WebOb-1.3.1.tar.gz
Writing /var/folders/dl/fxytxtf15zgc51n2rffrbdgh0000gn/T/easy_install-g29cdj/WebOb-1.3.1/setup.cfg
Running WebOb-1.3.1/setup.py -q bdist_egg --dist-dir /var/folders/dl/fxytxtf15zgc51n2rffrbdgh0000gn/T/easy_install-g29cdj/WebOb-1.3.1/egg-dist-tmp-bDdp4t
no previously-included directories found matching '*.pyc'
no previously-included directories found matching '*.pyo'
Adding WebOb 1.3.1 to easy-install.pth file

Installed /Users/michael/src/py/test_env/lib/python2.7/site-packages/WebOb-1.3.1-py2.7.egg
Finished processing dependencies for pyramid
(test_env)[michael@varga (Tue Apr 15 23:48:43) ~/src/py/test_env]% pcreate 
Traceback (most recent call last):
  File "/usr/local/bin/pcreate", line 5, in <module>
    from pkg_resources import load_entry_point
  File "build/bdist.macosx-10.8-intel/egg/pkg_resources.py", line 2749, in <module>
    dirname = os.path.dirname(path)
  File "build/bdist.macosx-10.8-intel/egg/pkg_resources.py", line 444, in _build_master
    (This is because ``sys.path`` can contain the same value more than
  File "build/bdist.macosx-10.8-intel/egg/pkg_resources.py", line 725, in require
    """Searchable snapshot of distributions on a search path"""
  File "build/bdist.macosx-10.8-intel/egg/pkg_resources.py", line 628, in resolve
    unloadable plugin distributions to an exception instance describing the
pkg_resources.DistributionNotFound: pyramid==1.5a2

Marius Gedminas

unread,
Apr 16, 2014, 2:27:45 AM4/16/14
to pylons-...@googlegroups.com
On Tue, Apr 15, 2014 at 09:07:05PM -0700, Michael wrote:
> after creating a new virtualenv and installing pyramid via easy_install, I
> simply call `pcreate` and I get this error:
>
> pkg_resources.DistributionNotFound: pyramid==1.5a2
>
> any ideas why? Python 2.7.3 Log follows:
>
>
> [michael@varga (Tue Apr 15 23:47:39) ~/src/py]% virtualenv test_env
> [michael@varga (Tue Apr 15 23:47:52) ~/src/py]% cd test_env
> [michael@varga (Tue Apr 15 23:47:55) ~/src/py/test_env]% source bin/activate
> (test_env)[michael@varga (Tue Apr 15 23:48:25) ~/src/py/test_env]% easy_install pyramid
...
> Best match: pyramid 1.5
...
> Installing pcreate script to /Users/michael/src/py/test_env/bin
...
> (test_env)[michael@varga (Tue Apr 15 23:48:43) ~/src/py/test_env]% pcreate
> Traceback (most recent call last):
> File "/usr/local/bin/pcreate", line 5, in <module>

Look closely here: you're running /usr/local/bin/pcreate instead of
/Users/michael/src/py/test_env/bin/pcreate.

Why? I'd've assumed that sourcing the activate script would put
/Users/michael/src/py/test_env/bin/ in front of your $PATH.

Can you try 'echo $PATH'?

Can you try 'hash pcreate' to see if bash had the full location of it
cached from before (but I always thought changing $PATH invalidates the
bash command hash table).

Marius Gedminas
--
Doing linear scans over an associative array is like trying to club someone to
death with a loaded Uzi.
-- Larry Wall
signature.asc

Tres Seaver

unread,
Apr 16, 2014, 12:27:08 PM4/16/14
to pylons-...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Or just quit relying on activate and use 'bin/pcreate' (or whatever) to
ensure you are getting the one you want.


Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tse...@palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlNOr1wACgkQ+gerLs4ltQ54ywCgypJfhBrd2+7s2Tox0eF0J0Zj
YF0Aniv8EPo1VWZHYPyuZDTRZXQTuuz2
=OWFU
-----END PGP SIGNATURE-----

Michael

unread,
Apr 17, 2014, 3:17:30 AM4/17/14
to pylons-...@googlegroups.com, tse...@palladion.com
Turns-out the problem was that I had an old version of pcreate in the dirs where home-brew installs python .. on both machines.

Thanks for the tips.
Reply all
Reply to author
Forward
0 new messages