Skip to content
This repository was archived by the owner on Sep 1, 2024. It is now read-only.
This repository was archived by the owner on Sep 1, 2024. It is now read-only.

bug in tools\pleft-bootstrap.py (?) #44

@ghost

Description

Hi Sander,

I was trying to install pleft on Win7x64. I have Python 2.7 from ActiveState installed and configured and also the PLENV variable. Upon issuing python p:\pleft\tools\pleft-bootstrap.py %PLENV% I get:

Traceback (most recent call last):
  File "tools\pleft-bootstrap.py", line 1512, in <module>
    main()
  File "tools\pleft-bootstrap.py", line 540, in main
    after_install(options, home_dir)
  File "tools\pleft-bootstrap.py", line 1144, in after_install
    subprocess.call([join(home_dir, 'bin', 'pip'), 'install', '--requirement=tools/requirements.txt'])
  File "P:\python27\lib\subprocess.py", line 486, in call
    return Popen(*popenargs, **kwargs).wait()
  File "P:\python27\lib\subprocess.py", line 672, in __init__
    errread, errwrite)
  File "P:\python27\lib\subprocess.py", line 882, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

Looking into p:\pleft\tools\pleft-bootstrap.py#L1143, the path is actually different than the one created in PLENV. There is no bin directory and pip.exe is actually in Scripts. So I changed 'bin' to 'Scripts' to read:

    subprocess.call([join(home_dir, 'Scripts', 'pip'),
                     'install', '--requirement=tools/requirements.txt'])

And re-executing python p:\pleft\tools\pleft-bootstrap.py %PLENV% it starts to download and install the 4 required packages but fails at MySQL-python-1.2.3:

Downloading/unpacking Django>=1.3 (from -r tools/requirements.txt (line 1))
  Downloading Django-1.3.1.tar.gz (6.5Mb): 6.5Mb downloaded
  Running setup.py egg_info for package Django

Downloading/unpacking gunicorn>=0.13.4 (from -r tools/requirements.txt (line 2))
  Downloading gunicorn-0.13.4.tar.gz (283Kb): 283Kb downloaded
  Running setup.py egg_info for package gunicorn

    warning: no files found matching '*' under directory 'debian'
Downloading/unpacking MySQL-python>=1.2.3 (from -r tools/requirements.txt (line 3))
  Downloading MySQL-python-1.2.3.tar.gz (70Kb): 70Kb downloaded
  Running setup.py egg_info for package MySQL-python
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File "z:\env\pleft\build\MySQL-python\setup.py", line 15, in <module>
        metadata, options = get_config()
      File "setup_windows.py", line 7, in get_config
        serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key'])
    WindowsError: [Error 2] The system cannot find the file specified
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 14, in <module>

  File "z:\env\pleft\build\MySQL-python\setup.py", line 15, in <module>

    metadata, options = get_config()

  File "setup_windows.py", line 7, in get_config

    serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key'])

WindowsError: [Error 2] The system cannot find the file specified

----------------------------------------
Command python setup.py egg_info failed with error code 1
Storing complete log in F:\Users\Bogdan\AppData\Roaming\pip\pip.log

I see that it tries to open the registry key HKLM\SOFTWARE\MySQL AB\MySQL Server 5.0 which does not exist because I have MySQL 5.5 installed (it's also installed from a zip package, and not the .exe installer). I then tried to install mysql-python in my core python 2.7 distribution using pypm to see if it fails in the same way and it did not, it installed just fine:

F:\ProgramData>pypm install mysql-python
The following packages will be installed into "%APPDATA%\Python" (2.7):
 mysql-python-1.2.3
Get: [pypm-free.activestate.com] mysql-python 1.2.3
Installing mysql-python-1.2.3

Any tips? I could install the ancient MySQL 5.0 but if you can think of a way to make it work without that then I think that will be better.

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions