(Windows) start_simpack can't find pkg_resources

56 views
Skip to first unread message

David Hopp

unread,
Dec 23, 2011, 4:07:38 PM12/23/11
to garl...@googlegroups.com
I just installed python 2.6 and GarlicSim under Windows Vista. Added C:\Program Files\GarlicSim\lib\ to Path. Doing Tutorial 2. Created top level dir for my sims. Used cmd window to execute start_simpack.py coin_flip. Got message that pkg_resources cannot be found. But there it is (pkg_resources.pyc) in the lib dir. Looked at start_simpack.py and I see that e.g. re and shutil (also in the lib dir) are imported prior to pkg_resources. No error message regarding them so I suppose they were found. Help please.

Ram Rachum

unread,
Dec 23, 2011, 4:33:57 PM12/23/11
to garl...@googlegroups.com
Hi David!

Because you say that you installed GarlicSim in Program Files, I can conclude that you used the end-user installer for GarlicSim. This installer is used for more passive usage of GarlicSim. (Which is not so useful now when it's in alpha.) It installs its own Python distribution which is separate from the Python that you installed.

You probably want to install GarlicSim as a Python module. Here are the instructions for that:

David Hopp

unread,
Dec 23, 2011, 5:09:42 PM12/23/11
to garl...@googlegroups.com
Hi Ram ... are you always there? Seriously though, I need more advice on the install.
 
1. I expect I should uninstall garlicsim?
 
2. Do I uninstall python 2.6?
 
2. Then exactly what steps? What should I download from your site? I am more or less a programmer, but new to python, so pip etc are a bit mysterious.
 
Many thanks for your help. You can see more about me at my web site, www.cassiodorus.com
 
David Hopp
Durham NC USA
just down the street from Duke University
 

From: r...@rachum.com
Date: Fri, 23 Dec 2011 16:33:57 -0500
Subject: Re: (Windows) start_simpack can't find pkg_resources
To: garl...@googlegroups.com

Ram Rachum

unread,
Dec 23, 2011, 5:21:10 PM12/23/11
to garl...@googlegroups.com
Hi David,

You should indeed uninstall GarlicSim (the end-user version). Don't uninstall Python though. 

I apologize for the following cumbersome installation procedure. The Python packaging system is still in its infancy.


Download this and run with Python:


This'll install the `distribute` package.

Then run

    easy_install pip

Assuming that the Python Scripts folder is on your system path. (If it's not, better put it there.)

Download this: http://sourceforge.net/projects/pywin32/files/pywin32/Build216/pywin32-216.win32-py2.6.exe/download and install. This provides better Windows integration.

Download this: http://downloads.sourceforge.net/wxpython/wxPython2.8-win32-unicode-2.8.12.1-py26.exe and install. This is the GUI framework.

Download this: http://www.voidspace.org.uk/downloads/psyco-1.6.win32-py2.6.zip and install. This is a JIT compiler that makes GarlicSim about x2 faster.

Then do

    pip install garlicsim_wx

Which will install all 3 packages of GarlicSim.

I think this is it. Let me know if this works.

And I'll be happy to hear about what kind of simulation you're trying to do :)

David Hopp

unread,
Dec 23, 2011, 6:21:27 PM12/23/11
to GarlicSim
Ah but this is Windows ... everything was going well but then I was in
the install garlicsim_wx step, running with admin privs (or at least I
so intend) and here's the log:

Downloading/unpacking garlicsim-wx
Exception:
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\pip-1.0.2-py2.6.egg\pip
\basecommand.py", line 126, in main
self.run(options, args)
File "C:\Python26\lib\site-packages\pip-1.0.2-py2.6.egg\pip\commands
\install.py", line 223, in run
requirement_set.prepare_files(finder,
force_root_egg_info=self.bundle, bundle=self.bundle)
File "C:\Python26\lib\site-packages\pip-1.0.2-py2.6.egg\pip\req.py",
line 948, in prepare_files
location = req_to_install.build_location(self.build_dir, not
self.is_download)
File "C:\Python26\lib\site-packages\pip-1.0.2-py2.6.egg\pip\req.py",
line 150, in build_location
_make_build_dir(build_dir)
File "C:\Python26\lib\site-packages\pip-1.0.2-py2.6.egg\pip\req.py",
line 1192, in _make_build_dir
os.makedirs(build_dir)
File "C:\Python26\lib\os.py", line 157, in makedirs
mkdir(name, mode)
WindowsError: [Error 5] Access is denied: 'C:\\Windows\\system32\
\build'

and here I sit. Ideas?

Ram Rachum

unread,
Dec 23, 2011, 6:22:55 PM12/23/11
to garl...@googlegroups.com
Perhaps your current directory in the shell was C:\Windows\\system32\  ?
If so, try running it with a less sensitive working directory.

David Hopp

unread,
Dec 23, 2011, 6:44:19 PM12/23/11
to GarlicSim
Of course! Install worked at root level. Been a long time since I did
this kind of work. I shall forge ahead.

Cheers
David

ho...@nchica.org

unread,
May 14, 2014, 4:29:35 PM5/14/14
to garl...@googlegroups.com
Trying to reach David Hopp to discuss this thread and NCHICA.
Reply all
Reply to author
Forward
0 new messages