eshad / httplib2

Automatically exported from code.google.com/p/httplib2
0 stars 0 forks source link

Error while installing httplib2-python3_0.5.0 on Mac OSX 10.6 #134

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. unzip httplib2-python3-0.5.0.zip
2. cd httplib2-python3-0.5.0
3. python3 setup.py install

What is the expected output? What do you see instead?
Output I get:

running install
running build
running build_py
creating build
creating build/lib
creating build/lib/httplib2
copying httplib2/__init__.py -> build/lib/httplib2
copying httplib2/iri2uri.py -> build/lib/httplib2
running install_lib
byte-compiling 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/ht
tplib2/__init__.py to __init__.pyc
  File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/httplib2/__init__.py", line 738
    print "connect: (%s, %s)" % (self.host, self.port)
                            ^
SyntaxError: invalid syntax

byte-compiling 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/ht
tplib2/iri2uri.py to iri2uri.pyc
  File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/httplib2/iri2uri.py", line 87
    u"ftp://ftp.is.co.za/rfc/rfc1808.txt",
                                        ^
SyntaxError: invalid syntax

running install_egg_info
Removing 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/ht
tplib2-python3_0.5.0-py3.1.egg-info
Writing 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/ht
tplib2-python3_0.5.0-py3.1.egg-info

What version of the product are you using? On what operating system?
Version : httplib2-python3-0.5.0  Operation System :Mac OSX 10.6

Please provide any additional information below.
I should be getting a clean install without any syntax error messages.
 1>Should the httplib2 be extracted where python3 is installed?
 2> Also what is the compatible httplib2 file for the above OS.
 3> Also I got a clean install for  httlplib2 when using "python":
//
Abhishek-Rajus-MacBook-Pro:httplib2-python3-0.5.0 abhi$ python setup.py install
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/httplib2
copying httplib2/__init__.py -> build/lib/httplib2
copying httplib2/iri2uri.py -> build/lib/httplib2
running install_lib
running install_egg_info
Writing /Library/Python/2.6/site-packages/httplib2-python3_0.5.0-py2.6.egg-info
//

But in both the cases I got error message while importing httplib2.

Thanks in Advance
-Regards,
Abhishek

Original issue reported on code.google.com by abhishek...@gmail.com on 1 Mar 2011 at 6:02

GoogleCodeExporter commented 9 years ago
Fixed in head.

Original comment by joe.gregorio@gmail.com on 13 Jun 2011 at 4:47

GoogleCodeExporter commented 9 years ago
i have just downloaded the latest httplib2 (0.7.1) and am having the same 
problem. could you elaborate on what the fix was and whether it has been added 
to latest code?

thanks,
Sally

Original comment by ahn.sa...@gmail.com on 6 Jul 2011 at 12:26

GoogleCodeExporter commented 9 years ago
I'm having the same issue even on version 0.7.1

Original comment by pe...@phyn3t.com on 6 Feb 2012 at 10:01

GoogleCodeExporter commented 9 years ago
I am having the same issue. Here's what I get when installing version 0.8 on 
python3.4:

$ sudo python3.4 setup.py install
running install
running bdist_egg
running egg_info
writing python3/httplib2.egg-info/PKG-INFO
writing dependency_links to python3/httplib2.egg-info/dependency_links.txt
writing top-level names to python3/httplib2.egg-info/top_level.txt
reading manifest file 'python3/httplib2.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'python3/httplib2.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.6-intel/egg
running install_lib
running build_py
creating build/bdist.macosx-10.6-intel/egg
creating build/bdist.macosx-10.6-intel/egg/httplib2
copying build/lib/httplib2/__init__.py -> 
build/bdist.macosx-10.6-intel/egg/httplib2
copying build/lib/httplib2/cacerts.txt -> 
build/bdist.macosx-10.6-intel/egg/httplib2
copying build/lib/httplib2/iri2uri.py -> 
build/bdist.macosx-10.6-intel/egg/httplib2
copying build/lib/httplib2/socks.py -> 
build/bdist.macosx-10.6-intel/egg/httplib2
byte-compiling build/bdist.macosx-10.6-intel/egg/httplib2/__init__.py to 
__init__.cpython-34.pyc
  File "build/bdist.macosx-10.6-intel/egg/httplib2/__init__.py", line 897
    print "connect: (%s, %s) ************" % (self.host, self.port)
                                         ^
SyntaxError: invalid syntax

byte-compiling build/bdist.macosx-10.6-intel/egg/httplib2/iri2uri.py to 
iri2uri.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/httplib2/socks.py to 
socks.cpython-34.pyc
creating build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying python3/httplib2.egg-info/PKG-INFO -> 
build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying python3/httplib2.egg-info/SOURCES.txt -> 
build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying python3/httplib2.egg-info/dependency_links.txt -> 
build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying python3/httplib2.egg-info/top_level.txt -> 
build/bdist.macosx-10.6-intel/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/httplib2-0.8-py3.4.egg' and adding 
'build/bdist.macosx-10.6-intel/egg' to it
removing 'build/bdist.macosx-10.6-intel/egg' (and everything under it)
Processing httplib2-0.8-py3.4.egg
Removing 
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/ht
tplib2-0.8-py3.4.egg
Copying httplib2-0.8-py3.4.egg to 
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages
httplib2 0.8 is already the active version in easy-install.pth

Installed 
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/ht
tplib2-0.8-py3.4.egg
Processing dependencies for httplib2==0.8
Finished processing dependencies for httplib2==0.8

Because of this installation error, the import statement results in an error:

$ python3.4
Python 3.4.0rc3 (v3.4.0rc3:8a81cdab3e9d, Mar  9 2014, 04:36:38) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import httplib2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 2214, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2199, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 2141, in _find_spec
  File "<frozen importlib._bootstrap>", line 1917, in find_spec
  File "<frozen importlib._bootstrap>", line 1893, in _get_spec
  File "<frozen importlib._bootstrap>", line 1874, in _legacy_get_spec
  File "<frozen importlib._bootstrap>", line 863, in spec_from_loader
  File "<frozen importlib._bootstrap>", line 904, in spec_from_file_location
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/httplib2-0.8-py3.4.egg/httplib2/__init__.py", line 897
    print "connect: (%s, %s) ************" % (self.host, self.port)
                                         ^
SyntaxError: invalid syntax

With python version 2, it seems to be working fine.

Is there any clue as to how to resolve this issue? Thanks in advance for your 
help.

Hoon

Original comment by biosprin...@gmail.com on 11 Mar 2014 at 3:00