gpt4 book ai didi

tweepy - 如何使用 Anacondas 和 easy_install 安装 Tweepy

转载 作者:行者123 更新时间:2023-12-03 22:47:59 25 4
gpt4 key购买 nike

我在 Anacondas Python 3.3 中安装 Tweepy 时遇到问题。

首先,我转到了 Python 3.3 安装的脚本目录。然后我跑了

easy_install tweepy

如果我在默认的 Python Scripts 目录中运行它,它可以工作,但这是我不想使用的旧 Python 版本。

我的输出如下。它说明了有关导入引号的内容。
C:\Anaconda\envs\py33\Scripts>easy_install tweepy
Searching for tweepy
Reading http://pypi.python.org/simple/tweepy/
Best match: tweepy 2.3.0
Downloading https://pypi.python.org/packages/source/t/tweepy/tweepy-2.3.0.tar.gz#md5=065c80d244360988c61d64b5dfb7e229
Processing tweepy-2.3.0.tar.gz
Writing c:\users\jon\appdata\local\temp\easy_install-tmda2q\tweepy-2.3.0\setup.cfg
Running tweepy-2.3.0\setup.py -q bdist_egg --dist-dir c:\users\jon\appdata\local\temp\easy_install-tmda2q\tweepy-2.3.0\egg-dist-tmp-006ghp
Traceback (most recent call last):
File "C:\Anaconda\envs\py33\Scripts\easy_install-script.py", line 5, in <module>
sys.exit(main())
File "C:\Anaconda\envs\py33\lib\site-packages\setuptools\command\easy_install.py", line 1986, in main
with_ei_usage(lambda:
File "C:\Anaconda\envs\py33\lib\site-packages\setuptools\command\easy_install.py", line 1967, in with_ei_usage
return f()
File "C:\Anaconda\envs\py33\lib\site-packages\setuptools\command\easy_install.py", line 1990, in <lambda>
distclass=DistributionWithoutHelpCommands, **kw
File "C:\Anaconda\envs\py33\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Anaconda\envs\py33\lib\distutils\dist.py", line 930, in run_commands
self.run_command(cmd)
File "C:\Anaconda\envs\py33\lib\distutils\dist.py", line 949, in run_command
cmd_obj.run()
File "C:\Anaconda\envs\py33\lib\site-packages\setuptools\command\easy_install.py", line 360, in run
self.easy_install(spec, not self.no_deps)
File "C:\Anaconda\envs\py33\lib\site-packages\setuptools\command\easy_install.py", line 604, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "C:\Anaconda\envs\py33\lib\site-packages\setuptools\command\easy_install.py", line 634, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "C:\Anaconda\envs\py33\lib\site-packages\setuptools\command\easy_install.py", line 829, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "C:\Anaconda\envs\py33\lib\site-packages\setuptools\command\easy_install.py", line 1109, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "C:\Anaconda\envs\py33\lib\site-packages\setuptools\command\easy_install.py", line 1095, in run_setup
run_setup(setup_script, args)
File "C:\Anaconda\envs\py33\lib\site-packages\setuptools\sandbox.py", line 34, in run_setup
lambda: exec(compile(open(
File "C:\Anaconda\envs\py33\lib\site-packages\setuptools\sandbox.py", line 82, in run
return func()
File "C:\Anaconda\envs\py33\lib\site-packages\setuptools\sandbox.py", line 37, in <lambda>
{'__file__':setup_script, '__name__':'__main__'})
File "setup.py", line 4, in <module>
File "c:\users\jon\appdata\local\temp\easy_install-tmda2q\tweepy-2.3.0\tweepy\__init__.py", line 12, in <module>
File "c:\users\jon\appdata\local\temp\easy_install-tmda2q\tweepy-2.3.0\tweepy\models.py", line 6, in <module>
File "c:\users\jon\appdata\local\temp\easy_install-tmda2q\tweepy-2.3.0\tweepy\utils.py", line 9, in <module>
ImportError: cannot import name quote

最佳答案

由于您将 Anaconda 用于 python。
https://anaconda.org/conda-forge/tweepy

像这样从终端安装 tweepy:
conda install -c conda-forge tweepy-c表示 channel = conda-forge

关于tweepy - 如何使用 Anacondas 和 easy_install 安装 Tweepy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24848925/

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