0

As I said, I am working in Python 3.3 and I was wondering if anyone can help me getting the pip module working.

When I look at the list of available modules using: help('modules'), the list contains "pip". When I then try to "import pip" or "pip install 'module name'" (obviously w/o the quotes) I get error messages.

When I type "pip install beautifulsoup", I get:

pip install beautifulsoup

SyntaxError: invalid syntax.

When I try:

"import pip", I get:

Traceback (most recent call last):

File "<pyshell#2>", line 1, in <module>
    import pip
  File "E:\lib\site-packages\pip\__init__.py", line 9, in <module>
    from pip.log import logger
  File "E:\lib\site-packages\pip\log.py", line 7, in <module>
    from pip import backwardcompat
  File "E:\lib\site-packages\pip\backwardcompat\__init__.py", line 27, in <module>
    console_encoding = sys.__stdout__.encoding
AttributeError: 'NoneType' object has no attribute 'encoding'

If anyone can help with this it would be very appreciated. Good luck!

mechanical_meat
  • 144,326
  • 21
  • 211
  • 203
user2070615
  • 53
  • 2
  • 8

1 Answers1

0

Used get-pip.py , which I installed successfully via the Windows cmd prompt, yet couldn't get the import working in the IDLE. Here's the complete log -:

C:\Python33\Lib>get-pip.py install
Downloading/unpacking pip
  Downloading pip-1.3.1.tar.gz (247Kb): 247Kb downloaded
  Running setup.py egg_info for package pip

    warning: no files found matching '*.html' under directory 'docs'
    warning: no previously-included files matching '*.txt' found under directory
 'docs\_build'
    no previously-included directories found matching 'docs\_build\_sources'
Installing collected packages: pip
  Found existing installation: pip 1.3.1
    Uninstalling pip:
      Successfully uninstalled pip
  Running setup.py install for pip

    warning: no files found matching '*.html' under directory 'docs'
    warning: no previously-included files matching '*.txt' found under directory
 'docs\_build'
    no previously-included directories found matching 'docs\_build\_sources'
    Installing pip-3.3-script.py script to C:\Python33\Scripts
    Installing pip-3.3.exe script to C:\Python33\Scripts
    Installing pip-script.py script to C:\Python33\Scripts
    Installing pip.exe script to C:\Python33\Scripts
Successfully installed pip
Cleaning up...

C:\Python33\Lib>cd pip-1.3.1

C:\Python33\Lib\pip-1.3.1>cd pip-1.3.1

C:\Python33\Lib\pip-1.3.1\pip-1.3.1>pip install beautifulsoup4
'pip' is not recognized as an internal or external command,
operable program or batch file.

C:\Python33\Lib\pip-1.3.1\pip-1.3.1>cd ..

C:\Python33\Lib\pip-1.3.1>cd..

C:\Python33\Lib>pip install beautifulsoup4
'pip' is not recognized as an internal or external command,
operable program or batch file.

C:\Python33\Lib>python3-pip RPM
'python3-pip' is not recognized as an internal or external command,
operable program or batch file.

C:\Python33\Lib>cd pip-1.3.1

C:\Python33\Lib\pip-1.3.1>cd pip-1.3.1

C:\Python33\Lib\pip-1.3.1\pip-1.3.1>get-pip.py install
Downloading/unpacking pip
  Downloading pip-1.3.1.tar.gz (247Kb): 247Kb downloaded
  Running setup.py egg_info for package pip

    warning: no files found matching '*.html' under directory 'docs'
    warning: no previously-included files matching '*.txt' found under directory
 'docs\_build'
    no previously-included directories found matching 'docs\_build\_sources'
Installing collected packages: pip
  Found existing installation: pip 1.3.1
    Uninstalling pip:
      Successfully uninstalled pip
  Running setup.py install for pip

    warning: no files found matching '*.html' under directory 'docs'
    warning: no previously-included files matching '*.txt' found under directory
 'docs\_build'
    no previously-included directories found matching 'docs\_build\_sources'
    Installing pip-3.3-script.py script to C:\Python33\Scripts
    Installing pip-3.3.exe script to C:\Python33\Scripts
    Installing pip-script.py script to C:\Python33\Scripts
    Installing pip.exe script to C:\Python33\Scripts
Successfully installed pip
Cleaning up...

C:\Python33\Lib\pip-1.3.1\pip-1.3.1>sudo easy_install pandas
'sudo' is not recognized as an internal or external command,
operable program or batch file.

C:\Python33\Lib\pip-1.3.1\pip-1.3.1>setup.py install
running install
running bdist_egg
running egg_info
writing dependency_links to pip.egg-info\dependency_links.txt
writing top-level names to pip.egg-info\top_level.txt
writing pip.egg-info\PKG-INFO
writing requirements to pip.egg-info\requires.txt
writing entry points to pip.egg-info\entry_points.txt
reading manifest file 'pip.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.html' under directory 'docs'
warning: no previously-included files matching '*.txt' found under directory 'do
cs\_build'
no previously-included directories found matching 'docs\_build\_sources'
writing manifest file 'pip.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
creating build\bdist.win-amd64\egg
creating build\bdist.win-amd64\egg\pip
creating build\bdist.win-amd64\egg\pip\backwardcompat
copying build\lib\pip\backwardcompat\socket_create_connection.py -> build\bdist.
win-amd64\egg\pip\backwardcompat
copying build\lib\pip\backwardcompat\ssl_match_hostname.py -> build\bdist.win-am
d64\egg\pip\backwardcompat
copying build\lib\pip\backwardcompat\__init__.py -> build\bdist.win-amd64\egg\pi
p\backwardcompat
copying build\lib\pip\basecommand.py -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\baseparser.py -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\cacert.pem -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\cmdoptions.py -> build\bdist.win-amd64\egg\pip
creating build\bdist.win-amd64\egg\pip\commands
copying build\lib\pip\commands\bundle.py -> build\bdist.win-amd64\egg\pip\comman
ds
copying build\lib\pip\commands\completion.py -> build\bdist.win-amd64\egg\pip\co
mmands
copying build\lib\pip\commands\freeze.py -> build\bdist.win-amd64\egg\pip\comman
ds
copying build\lib\pip\commands\help.py -> build\bdist.win-amd64\egg\pip\commands

copying build\lib\pip\commands\install.py -> build\bdist.win-amd64\egg\pip\comma
nds
copying build\lib\pip\commands\list.py -> build\bdist.win-amd64\egg\pip\commands

copying build\lib\pip\commands\search.py -> build\bdist.win-amd64\egg\pip\comman
ds
copying build\lib\pip\commands\show.py -> build\bdist.win-amd64\egg\pip\commands

copying build\lib\pip\commands\uninstall.py -> build\bdist.win-amd64\egg\pip\com
mands
copying build\lib\pip\commands\unzip.py -> build\bdist.win-amd64\egg\pip\command
s
copying build\lib\pip\commands\zip.py -> build\bdist.win-amd64\egg\pip\commands
copying build\lib\pip\commands\__init__.py -> build\bdist.win-amd64\egg\pip\comm
ands
copying build\lib\pip\download.py -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\exceptions.py -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\index.py -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\locations.py -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\log.py -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\req.py -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\runner.py -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\status_codes.py -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\util.py -> build\bdist.win-amd64\egg\pip
creating build\bdist.win-amd64\egg\pip\vcs
copying build\lib\pip\vcs\bazaar.py -> build\bdist.win-amd64\egg\pip\vcs
copying build\lib\pip\vcs\git.py -> build\bdist.win-amd64\egg\pip\vcs
copying build\lib\pip\vcs\mercurial.py -> build\bdist.win-amd64\egg\pip\vcs
copying build\lib\pip\vcs\subversion.py -> build\bdist.win-amd64\egg\pip\vcs
copying build\lib\pip\vcs\__init__.py -> build\bdist.win-amd64\egg\pip\vcs
copying build\lib\pip\__init__.py -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\__main__.py -> build\bdist.win-amd64\egg\pip
byte-compiling build\bdist.win-amd64\egg\pip\backwardcompat\socket_create_connec
tion.py to socket_create_connection.cpython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\backwardcompat\ssl_match_hostname.p
y to ssl_match_hostname.cpython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\backwardcompat\__init__.py to __ini
t__.cpython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\basecommand.py to basecommand.cpyth
on-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\baseparser.py to baseparser.cpython
-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\cmdoptions.py to cmdoptions.cpython
-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\commands\bundle.py to bundle.cpytho
n-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\commands\completion.py to completio
n.cpython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\commands\freeze.py to freeze.cpytho
n-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\commands\help.py to help.cpython-33
.pyc
byte-compiling build\bdist.win-amd64\egg\pip\commands\install.py to install.cpyt
hon-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\commands\list.py to list.cpython-33
.pyc
byte-compiling build\bdist.win-amd64\egg\pip\commands\search.py to search.cpytho
n-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\commands\show.py to show.cpython-33
.pyc
byte-compiling build\bdist.win-amd64\egg\pip\commands\uninstall.py to uninstall.
cpython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\commands\unzip.py to unzip.cpython-
33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\commands\zip.py to zip.cpython-33.p
yc
byte-compiling build\bdist.win-amd64\egg\pip\commands\__init__.py to __init__.cp
ython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\download.py to download.cpython-33.
pyc
byte-compiling build\bdist.win-amd64\egg\pip\exceptions.py to exceptions.cpython
-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\index.py to index.cpython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\locations.py to locations.cpython-3
3.pyc
byte-compiling build\bdist.win-amd64\egg\pip\log.py to log.cpython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\req.py to req.cpython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\runner.py to runner.cpython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\status_codes.py to status_codes.cpy
thon-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\util.py to util.cpython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\vcs\bazaar.py to bazaar.cpython-33.
pyc
byte-compiling build\bdist.win-amd64\egg\pip\vcs\git.py to git.cpython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\vcs\mercurial.py to mercurial.cpyth
on-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\vcs\subversion.py to subversion.cpy
thon-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\vcs\__init__.py to __init__.cpython
-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\__init__.py to __init__.cpython-33.
pyc
byte-compiling build\bdist.win-amd64\egg\pip\__main__.py to __main__.cpython-33.
pyc
creating build\bdist.win-amd64\egg\EGG-INFO
copying pip.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
copying pip.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying pip.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying pip.egg-info\entry_points.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying pip.egg-info\not-zip-safe -> build\bdist.win-amd64\egg\EGG-INFO
copying pip.egg-info\requires.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying pip.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
creating 'dist\pip-1.3.1-py3.3.egg' and adding 'build\bdist.win-amd64\egg' to it

removing 'build\bdist.win-amd64\egg' (and everything under it)
Processing pip-1.3.1-py3.3.egg
creating c:\python33\lib\site-packages\pip-1.3.1-py3.3.egg
Extracting pip-1.3.1-py3.3.egg to c:\python33\lib\site-packages
Adding pip 1.3.1 to easy-install.pth file
Installing pip-3.3-script.py script to C:\Python33\Scripts
Installing pip-3.3.exe script to C:\Python33\Scripts
Installing pip-script.py script to C:\Python33\Scripts
Installing pip.exe script to C:\Python33\Scripts

Installed c:\python33\lib\site-packages\pip-1.3.1-py3.3.egg
Processing dependencies for pip==1.3.1
Finished processing dependencies for pip==1.3.1

import pip in IDLE [I am with Python 3.3.0]

>

 import pip
Traceback (most recent call last):
  File "<pyshell#5>", line 1, in <module>
    import pip
  File "C:\Python33\lib\site-packages\pip\__init__.py", line 9, in <module>
    from pip.log import logger
  File "C:\Python33\lib\site-packages\pip\log.py", line 7, in <module>
    from pip import backwardcompat
  File "C:\Python33\lib\site-packages\pip\backwardcompat\__init__.py", line 27, in <module>
    console_encoding = sys.__stdout__.encoding
AttributeError: 'NoneType' object has no attribute 'encoding'
ekta
  • 1,472
  • 3
  • 24
  • 54
  • pip-1.3.1 worked sucessfully. Downloaded it manually into the Lib Folder after which I ran setup.py install. Following this the easy_install and pip were available in the Scripts folder and all installs via "pip install " worked successfully – ekta Apr 02 '13 at 06:35