gpt4 book ai didi

python - Python 中的地理库问题

转载 作者:行者123 更新时间:2023-12-01 22:17:35 26 4
gpt4 key购买 nike

我想使用地理库来提取地点的详细信息。我无法安装它。我安装了枕头、报纸、lxml、beautifulsoup4 和所有 nltk Corpas。在安装报纸时,它在 distribute-0.6.21 库中给我一个错误,所以我安装了它,之后,我尝试安装的每个模块都面临以下错误:

$ conda install newspaper

Traceback (most recent call last):
File "/Users/palakagrawal/anaconda/lib/python3.5/site-packages/conda/exceptions.py", line 626, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/Users/palakagrawal/anaconda/lib/python3.5/site-packages/conda/cli/main.py", line 85, in _main
from ..base.context import context
File "/Users/palakagrawal/anaconda/lib/python3.5/site-packages/conda/base/context.py", line 18, in <module>
from .._vendor.auxlib.path import expand
File "/Users/palakagrawal/anaconda/lib/python3.5/site-packages/conda/_vendor/auxlib/path.py", line 8, in <module>
import pkg_resources
File "/Users/palakagrawal/anaconda/lib/python3.5/site-packages/pkg_resources.py", line 45
def _bypass_ensure_directory(name, mode=0777):
^
SyntaxError: invalid token

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/palakagrawal/anaconda/bin/conda", line 6, in <module>
sys.exit(conda.cli.main())
File "/Users/palakagrawal/anaconda/lib/python3.5/site-packages/conda/cli/main.py", line 162, in main
return conda_exception_handler(_main, *args)
File "/Users/palakagrawal/anaconda/lib/python3.5/site-packages/conda/exceptions.py", line 630, in conda_exception_handler
return handle_exception(e)
File "/Users/palakagrawal/anaconda/lib/python3.5/site-packages/conda/exceptions.py", line 620, in handle_exception
print_unexpected_error_message(e)
File "/Users/palakagrawal/anaconda/lib/python3.5/site-packages/conda/exceptions.py", line 561, in print_unexpected_error_message
from conda.base.context import context
File "/Users/palakagrawal/anaconda/lib/python3.5/site-packages/conda/base/context.py", line 18, in <module>
from .._vendor.auxlib.path import expand
File "/Users/palakagrawal/anaconda/lib/python3.5/site-packages/conda/_vendor/auxlib/path.py", line 8, in <module>
import pkg_resources
File "/Users/palakagrawal/anaconda/lib/python3.5/site-packages/pkg_resources.py", line 45
def _bypass_ensure_directory(name, mode=0777):
^
SyntaxError: invalid token

请帮我解决上面的错误并建议我安装地理模块的方法

最佳答案

有一个 python 3 版本/fork,geograpy3。有关安装说明,请查看 https://pypi.org/project/geograpy3/

关于python - Python 中的地理库问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43535987/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com