想用python2安装brian2 模块 结果一直报错
被困扰好多天了
求解答
```python
C:\Users\shiyan>python2 -m pip install brian2
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Collecting brian2
Using cached Brian2-2.3.0.2.tar.gz (1.6 MB)
Requirement already satisfied: numpy>=1.10 in c:\python27\lib\site-packages (from brian2) (1.16.6)
Collecting cython>=0.29
Using cached Cython-0.29.32-py2.py3-none-any.whl (986 kB)
Collecting sympy>=1.2
Using cached sympy-1.5.1-py2.py3-none-any.whl (5.6 MB)
Requirement already satisfied: pyparsing in c:\python27\lib\site-packages (from brian2) (2.4.7)
Collecting jinja2>=2.7
Using cached Jinja2-2.11.3-py2.py3-none-any.whl (125 kB)
Requirement already satisfied: setuptools>=24 in c:\python27\lib\site-packages (from brian2) (39.0.1)
Collecting future
Using cached future-0.18.2.tar.gz (829 kB)
Collecting py-cpuinfo
Using cached py-cpuinfo-8.0.0.tar.gz (99 kB)
Collecting mpmath>=0.19
Using cached mpmath-1.2.1.tar.gz (2.1 MB)
ERROR: Command errored out with exit status 1:
command: 'C:\Users\shiyan\AppData\Local\Programs\Python\Scripts\python2.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\shiyan\\appdata\\local\\temp\\pip-install-qsgpzx\\mpmath\\setup.py'"'"'; __file__='"'"'c:\\users\\shiyan\\appdata\\local\\temp\\pip-install-qsgpzx\\mpmath\\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\shiyan\appdata\local\temp\pip-pip-egg-info-gtuiw2'
cwd: c:\users\shiyan\appdata\local\temp\pip-install-qsgpzx\mpmath\
Complete output (58 lines):
C:\Python27\lib\site-packages\setuptools\pep425tags.py:89: RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
warn=(impl == 'cp')):
C:\Python27\lib\site-packages\setuptools\pep425tags.py:93: RuntimeWarning: Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
warn=(impl == 'cp')):
C:\Python27\lib\site-packages\setuptools\pep425tags.py:99: RuntimeWarning: Config variable 'Py_UNICODE_SIZE' is unset, Python ABI tag may be incorrect
sys.version_info < (3, 3))) \
Traceback (most recent call last):
File "", line 1, in
File "c:\users\shiyan\appdata\local\temp\pip-install-qsgpzx\mpmath\setup.py", line 6, in
setuptools.setup(use_scm_version=True)
File "C:\Python27\lib\site-packages\setuptools\__init__.py", line 128, in setup
_install_setup_requires(attrs)
File "C:\Python27\lib\site-packages\setuptools\__init__.py", line 123, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "C:\Python27\lib\site-packages\setuptools\dist.py", line 513, in fetch_build_eggs
replace_conflicting=True,
File "C:\Python27\lib\site-packages\pkg_resources\__init__.py", line 774, in resolve
replace_conflicting=replace_conflicting
File "C:\Python27\lib\site-packages\pkg_resources\__init__.py", line 1057, in best_match
return self.obtain(req, installer)
File "C:\Python27\lib\site-packages\pkg_resources\__init__.py", line 1069, in obtain
return installer(requirement)
File "C:\Python27\lib\site-packages\setuptools\dist.py", line 580, in fetch_build_egg
return cmd.easy_install(req)
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 673, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 699, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 884, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 1152, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 1138, in run_setup
run_setup(setup_script, args)
File "C:\Python27\lib\site-packages\setuptools\sandbox.py", line 253, in run_setup
raise
File "C:\Python27\Lib\contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Python27\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "C:\Python27\Lib\contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Python27\lib\site-packages\setuptools\sandbox.py", line 166, in save_modules
saved_exc.resume()
File "C:\Python27\lib\site-packages\setuptools\sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "C:\Python27\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
yield saved
File "C:\Python27\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "C:\Python27\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "C:\Python27\lib\site-packages\setuptools\sandbox.py", line 44, in _execfile
code = compile(script, filename, 'exec')
File "c:\users\shiyan\appdata\local\temp\easy_install-mfbele\setuptools_scm-7.0.5\setup.py", line 20
def scm_version() -> str:
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
```