duduklein
duduklein

Reputation: 10604

Strange error installing Psyco in Python

I have installed psyco in one machine with no problem, but i'm getting an strange error while installing in one other machine. I'm not able to use easy_install, since it gives me an error:

C:\Python26\Downloads\psyco-1.6>easy_install psyco
Searching for psyco
Reading http://pypi.python.org/simple/psyco/
Reading http://psyco.sourceforge.net/
Best match: psyco snapshot
Downloading http://wyvern.cs.uni-duesseldorf.de/psyco/psyco-snapshot.tar.gz
error: Can't download http://wyvern.cs.uni-duesseldorf.de/psyco/psyco-snapshot.t
ar.gz: 404 Not Found

So, I download the last version 1.6 and did "python setup.py install". I have already used it several times with no problem. I get the follwing messages:

C:\Python26\Downloads\psyco-1.6>python setup.py install
PROCESSOR = 'i386'
running install
running build
running build_py
running build_ext
building 'psyco._psyco' extension
Traceback (most recent call last):
  File "setup.py", line 180, in <module>
    **kwds )
  File "C:\python26\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "C:\python26\lib\distutils\dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "C:\python26\lib\distutils\dist.py", line 995, in run_command
    cmd_obj.run()
  File "C:\python26\lib\distutils\command\install.py", line 577, in run
    self.run_command('build')
  File "C:\python26\lib\distutils\cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "C:\python26\lib\distutils\dist.py", line 995, in run_command
    cmd_obj.run()
  File "C:\python26\lib\distutils\command\build.py", line 134, in run
    self.run_command(cmd_name)
  File "C:\python26\lib\distutils\cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "C:\python26\lib\distutils\dist.py", line 995, in run_command
    cmd_obj.run()
  File "C:\python26\lib\distutils\command\build_ext.py", line 340, in run
    self.build_extensions()
  File "C:\python26\lib\distutils\command\build_ext.py", line 449, in build_exte
nsions
    self.build_extension(ext)
  File "C:\python26\lib\distutils\command\build_ext.py", line 499, in build_exte
nsion
    depends=ext.depends)
  File "C:\python26\lib\distutils\msvc9compiler.py", line 449, in compile
    self.initialize()
  File "C:\python26\lib\distutils\msvc9compiler.py", line 359, in initialize
    vc_env = query_vcvarsall(VERSION, plat_spec)
  File "C:\python26\lib\distutils\msvc9compiler.py", line 275, in query_vcvarsal
l
    raise ValueError(str(list(result.keys())))
ValueError: [u'path']

Any ideas on why I'm getting this error? Thanks

Upvotes: 1

Views: 1945

Answers (2)

kon psych
kon psych

Reputation: 666

I am trying to get around this problem too (while trying to install another module). The problem is the script msvc9compiler.py is trying to find and vcvarsall.bat which is under a folder like C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC which in turn is trying to find and execute a script under C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools in my case vcvars32.bat. This script is setting-updating certain variables: PATH, LIB and 2 others that are never set/updated in your case.

My workaround was to find the *.bat manually and run it in the prompt from which I would then run the installation command. The variables are set correctly this way but only during the session of the command prompt.

Try running echo %LIB%, before and after running the script, to see that the variable is indeed set.

Upvotes: 0

Jason R. Coombs
Jason R. Coombs

Reputation: 42679

It appears that psyco has extension modules that need to be built. The error message you're getting is not what I would expect, but it seems to indicate that it's not finding the Microsoft Visual C++ compiler, required (at least recommended over other compilers) for building extension modules for Python 2.6.

If you really want to build from sources, I suggest you download the Microsoft Visual C++ 2008 Express Edition or Microsoft Visual Studio 2008 trial.

You would probably be better off reading this thread, and downloading a pre-compiled binary from someone in the community who has already compiled it.

Edit: I just noticed that on the Psyco home page there is a link to Python 2.6 pre-compiled binaries by Michael Foord. These would be preferable.

Upvotes: 2

Related Questions