当我尝试从源代码安装ckan软件包时,我在CMD上收到此错误消息。
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\model\related.py", line 91
raise Exception, 'Unable to attach `related_count` to Package class.'
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-p`enter code here`ackages\ckan-2.3a-py3
.4.egg\ckan\new_tests\logic\test_validators.py", line 158
100L,
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\pastertemplates\__init__.py", line 38
print "\nError: Expected the project name to start with 'ckanext-'"
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\tests\wsgi_ckanclient.py", line 29
print "ckanclient: Opening %s" % location
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\tests\__init__.py", line 82
raise Exception, "Couldn't execute cmd: %s: %s" % (cmd, output)
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\tests\functional\test_cors.py", line 19
print headers
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\tests\functional\test_group.py", line 284
print offset
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\tests\functional\test_package.py", line 231
print pkg_by_name_main
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\tests\functional\test_related.py", line 48
print '@@@@', offset
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\tests\functional\test_revision.py", line 82
print "\nThe first response (list):\n\n"
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\tests\functional\test_search.py", line 88
print offset
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\tests\functional\api\base.py", line 187
except ValueError, inst:
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\tests\functional\api\test_activity.py", line 226
print '@@@@@@@@', extra_environ
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\tests\functional\api\test_package_search.py", line 226
print offset
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\tests\functional\api\test_user.py", line 33
print response.json
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\tests\functional\api\model\test_package.py", line 641
print package1_offset, package2_data
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\tests\functional\api\model\test_relationships.py", line 256
print res.body
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\tests\lib\test_dictization.py", line 250
print "\n".join(unified_diff(pformat(result).split("\n"), pformat(self.packa
ge_expected).split("\n")))
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\tests\lib\test_field_types.py", line 19
('2/11/67 9:04', 'DD/MM/YYYY HH:MM', [1967, 11, 2, 9, 04]),
^
SyntaxError: invalid token
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\tests\lib\test_navl.py", line 98
print set(full_schema.keys()) - set(data.keys())
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\tests\lib\test_solr_schema_version.py", line 40
except SearchError,e:
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\tests\lib\test_solr_search_index.py", line 25
except socket.error, e:
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\tests\logic\test_action.py", line 205
print package_created
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\tests\logic\test_auth.py", line 399
print model.Session.query(model.Member).filter_by(state='deleted').all()
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\tests\misc\test_sync.py", line 42
except urllib2.URLError, e:
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckan\tests\models\test_resource.py", line 136
print lastres
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckanext\datapusher\plugin.py", line 113
except p.toolkit.ValidationError, e:
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckanext\datapusher\logic\action.py", line 94
except requests.exceptions.ConnectionError, e:
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckanext\datapusher\tests\test.py", line 169
print res.body
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckanext\datastore\db.py", line 148
except ProgrammingError, e:
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckanext\example_theme\v03_jinja\plugin.py", line 1
../v02_empty_template/plugin.py
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckanext\example_theme\v04_ckan_extends\plugin.py", line 1
../v03_jinja/plugin.py
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckanext\example_theme\v05_block\plugin.py", line 1
../v04_ckan_extends/plugin.py
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckanext\example_theme\v06_super\plugin.py", line 1
../v05_block/plugin.py
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckanext\example_theme\v07_helper_function\plugin.py", line 1
../v06_super/plugin.py
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckanext\example_theme\v09_snippet\plugin.py", line 1
../v08_custom_helper_function/plugin.py
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckanext\example_theme\v10_custom_snippet\plugin.py", line 1
../v09_snippet/plugin.py
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckanext\example_theme\v11_HTML_and_CSS\plugin.py", line 1
../v10_custom_snippet/plugin.py
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckanext\example_theme\v13_custom_css\plugin.py", line 1
../v12_extra_public_dir/plugin.py
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckanext\example_theme\v14_more_custom_css\plugin.py", line 1
../v13_custom_css/plugin.py
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckanext\example_theme\v17_popover\plugin.py", line 1
../v16_initialize_a_javascript_module/plugin.py
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckanext\example_theme\v18_snippet_api\plugin.py", line 1
../v17_popover/plugin.py
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckanext\example_theme\v19_01_error\plugin.py", line 1
../v18_snippet_api/plugin.py
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckanext\example_theme\v19_02_error_handling\plugin.py", line 1
../v19_01_error/plugin.py
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckanext\example_theme\v20_pubsub\plugin.py", line 1
../v19_02_error_handling/plugin.py
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckanext\example_theme\v21_custom_jquery_plugin\plugin.py", line 1
../v20_pubsub/plugin.py
^
SyntaxError: invalid syntax
File "c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-py3
.4.egg\ckanext\resourceproxy\controller.py", line 65
except requests.exceptions.HTTPError, error:
^
SyntaxError: invalid syntax
ckan 2.3a is already the active version in easy-install.pth
Installing ckan-admin-script.py script to C:\Users\blissmen.Anonymous\Envs\Defau
lt\Scripts
Installing ckan-admin.exe script to C:\Users\blissmen.Anonymous\Envs\Default\Scr
ipts
Installing ckan-admin.exe.manifest script to C:\Users\blissmen.Anonymous\Envs\De
fault\Scripts
Installed c:\users\blissmen.anonymous\envs\default\lib\site-packages\ckan-2.3a-p
y3.4.egg
Processing dependencies for ckan==2.3a
Finished processing dependencies for ckan==2.3a
答案 0 :(得分:1)
这些语法错误表明您的软件包是为Python 2编写的,但显然您正在尝试使用Python 3.4进行安装。
您应该安装Python 2.7并重试。