Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Syntax error while installing Python3 #511

Open
AkhilJPatil opened this issue Mar 10, 2020 · 2 comments
Open

Syntax error while installing Python3 #511

AkhilJPatil opened this issue Mar 10, 2020 · 2 comments

Comments

@AkhilJPatil
Copy link

AkhilJPatil commented Mar 10, 2020

Not sure if transitfeed is ready for python3!
Already went through #493, #412 and response by pecalleja 4 months ago.

Tried installing the transitfeed module on
windows 10, Python version: 3.5.2
and ubuntu 18.04.3, Python version: 3.6.9

Getting below syntax error. Is there an error free alternate file availble at some other path or should just remove the syntax locally and try to install it.

#############################WIN10###############################

pip install transitfeed --user --no-index --find-links C:/Users//Downloads/transitfeed-1.2.16.tar.gz
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see pypa/pip#5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Looking in links: c:/Users//Downloads/transitfeed-1.2.16.tar.gz
Processing c:\users<user>\downloads\transitfeed-1.2.16.tar.gz
ERROR: Command errored out with exit status 1:
command: 'c:\program files\python35\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\\AppData\Local\Temp\pip-install-z4hqaij0\transitfeed\setup.py'"'"'; file='"'"'C:\Users\\AppData\Local\Temp\pip-install-z4hqaij0\transitfeed\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users<user>\AppData\Local\Temp\pip-install-z4hqaij0\transitfeed\pip-egg-info'
cwd: C:\Users<user>\AppData\Local\Temp\pip-install-z4hqaij0\transitfeed
Complete output (6 lines):
Traceback (most recent call last):
File "", line 1, in
File "C:\Users<user>\AppData\Local\Temp\pip-install-z4hqaij0\transitfeed\setup.py", line 34
except ImportError, e:
^
SyntaxError: invalid syntax
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

#############################UBUNTU###############################

~$ pip install transitfeed
Collecting transitfeed
Downloading https://files.pythonhosted.org/packages/56/63/b129a3addfcb4b71033875d62ab4106b96498c2fb56dfdbf05542274b2cf/transitfeed-1.2.16.tar.gz (359kB)
100% |████████████████████████████████| 368kB 1.1MB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-t_16sefl/transitfeed/setup.py", line 34
except ImportError, e:
^
SyntaxError: invalid syntax

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-t_16sefl/transitfeed/

Please suggest.
Thanks!

@pecalleja
Copy link

pecalleja commented Mar 18, 2020 via email

@campbellhealy
Copy link

In the util.py file change the import urllib2 to import urllib and that will solve this issue and install on the latest version of Python

dzonesasaki added a commit to dzonesasaki/transitfeed that referenced this issue Jul 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants