Python 2.7 - (Library|Module) Installation on 64 bit

1 - Steps

python install

running install
running bdist_egg
running egg_info
writing requirements to oauth2.egg-info\requires.txt
writing oauth2.egg-info\PKG-INFO
writing top-level names to oauth2.egg-info\top_level.txt
writing dependency_links to oauth2.egg-info\dependency_links.txt
reading manifest file 'oauth2.egg-info\SOURCES.txt'
writing manifest file 'oauth2.egg-info\SOURCES.txt'
installing library code to build\\egg
running install_lib
running build_py
creating build
creating build\lib
creating build\lib\oauth2
copying oauth2\ -> build\lib\oauth2
copying oauth2\ -> build\lib\oauth2
creating build\lib\tests
copying tests\ -> build\lib\tests
copying tests\ -> build\lib\tests
creating build\lib\oauth2\clients
copying oauth2\clients\ -> build\lib\oauth2\clients
copying oauth2\clients\ -> build\lib\oauth2\clients
copying oauth2\clients\ -> build\lib\oauth2\clients
creating build\
creating build\\egg
creating build\\egg\oauth2
creating build\\egg\oauth2\clients
copying build\lib\oauth2\clients\ -> build\\egg\oauth2\clients
copying build\lib\oauth2\clients\ -> build\\egg\oauth2\clients
copying build\lib\oauth2\clients\ -> build\\egg\oauth2\clients
copying build\lib\oauth2\ -> build\\egg\oauth2
copying build\lib\oauth2\ -> build\\egg\oauth2
creating build\\egg\tests
copying build\lib\tests\ -> build\\egg\tests
copying build\lib\tests\ -> build\\egg\tests
byte-compiling build\\egg\oauth2\clients\ to imap.pyc
byte-compiling build\\egg\oauth2\clients\ to smtp.pyc
byte-compiling build\\egg\oauth2\clients\ to __init__.pyc
byte-compiling build\\egg\oauth2\ to _version.pyc
byte-compiling build\\egg\oauth2\ to __init__.pyc
byte-compiling build\\egg\tests\ to test_oauth.pyc
byte-compiling build\\egg\tests\ to __init__.pyc
creating build\\egg\EGG-INFO
copying oauth2.egg-info\PKG-INFO -> build\\egg\EGG-INFO
copying oauth2.egg-info\SOURCES.txt -> build\\egg\EGG-INFO
copying oauth2.egg-info\dependency_links.txt -> build\\egg\EGG-INFO
copying oauth2.egg-info\requires.txt -> build\\egg\EGG-INFO
copying oauth2.egg-info\top_level.txt -> build\\egg\EGG-INFO
copying oauth2.egg-info\zip-safe -> build\\egg\EGG-INFO
creating dist
creating 'dist\oauth2-1.5.211-py2.7.egg' and adding 'build\\egg' to it
removing 'build\\egg' (and everything under it)
Processing oauth2-1.5.211-py2.7.egg
Copying oauth2-1.5.211-py2.7.egg to c:\python27\lib\site-packages
Adding oauth2 1.5.211 to easy-install.pth file

Installed c:\python27\lib\site-packages\oauth2-1.5.211-py2.7.egg
Processing dependencies for oauth2==1.5.211
Searching for httplib2
Best match: httplib2 0.8
Running httplib2-0.8\ -q bdist_egg --dist-dir c:\users\gerard\appdata\local\temp\easy_install-4xhxlm\httplib2-0.8\egg-dist-tmp-rbo
zip_safe flag not set; analyzing archive contents...
httplib2.__init__: module references __file__
Adding httplib2 0.8 to easy-install.pth file

Installed c:\python27\lib\site-packages\httplib2-0.8-py2.7.egg
Finished processing dependencies for oauth2==1.5.211

Install will fire two steps:

  • the build
  • and the installation

1.1 - Build

python build

The build command is responsible for putting the files to install into a build directory.

By default, this is build under the distribution root. You can change the build directory with the –build-base option.

python build --build-base=/path/to/pybuild/foo-1.0

1.2 - Install

python install

Install copies everything under build/lib (or build/lib.plat) to an installation directory.

The default value on windows is Python_Home\Lib\site-packages.

2 - Support

2.1 - ImportError: No module named setuptools

Traceback (most recent call last):
  File "", line 2, in <module>
    from setuptools import setup, find_packages
ImportError: No module named setuptools

Install the setup tools

2.2 - Windows 64 bit: python was not found in the registry

2.2.1 - First

reg copy HKLM\SOFTWARE\Python HKLM\SOFTWARE\Wow6432Node\Python /s

2.2.2 - Two

The library installation try to find the key registry under HKEY_CURRENT_USER. If the python installation was performed for All User, the key are present under HKEY_LOCAL_MACHINE.

To create the keys under HKEY_CURRENT_USER:

  • download the keys under HKEY_LOCAL_MACHINE.

  • open the exported file with a text editor and replace HKEY_LOCAL_MACHINE with HKEY_CURRENT_USER to obtain:

Windows Registry Editor Version 5.00





[HKEY_CURRENT_USER\SOFTWARE\Python\PythonCore\2.7\Help\Main Python Documentation]


@="Python 2.7"



  • Save the file and run it

regedt32 python_key.reg

3 - Documentation / Reference

Data Science
Data Analysis
Data Science
Linear Algebra Mathematics

Powered by ComboStrap