Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/316.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 在Ubuntu上安装tweepy_Python_Ubuntu_Python 3.x_Tweepy - Fatal编程技术网

Python 在Ubuntu上安装tweepy

Python 在Ubuntu上安装tweepy,python,ubuntu,python-3.x,tweepy,Python,Ubuntu,Python 3.x,Tweepy,因此,我按照网站上的说明安装了tweepy: git clone https://github.com/tweepy/tweepy.git cd tweepy python setup.py install 出于权限原因,我只需要做sudopython3setup.py安装,然后为python3.4安装 我不断得到错误: six 1.5.2已经是easy-install.pth中的活动版本 已安装/usr/local/lib/python3.4/dist-packages/six-1.5.2-

因此,我按照网站上的说明安装了tweepy:

git clone https://github.com/tweepy/tweepy.git
cd tweepy
python setup.py install
出于权限原因,我只需要做
sudopython3setup.py安装
,然后为python3.4安装

我不断得到错误:

six 1.5.2已经是easy-install.pth中的活动版本

已安装/usr/local/lib/python3.4/dist-packages/six-1.5.2-py3.4.egg 错误:找不到所需的分发版本6>=1.7.3

但是,如果我键入:

$ pip freeze | grep six
six==1.9.0. 
$ pip freeze | grep tweepy
tweepy==3.3.0
如果我在我的机器上简单地导入tweepy,我会得到
ImportError:No module names'requests\u oauthlib'
。我错过了哪一步


安装在我的windows计算机上运行良好,但在我的Ubuntu计算机(而不是VM)上,我发现了这些错误。

从我发现的情况来看,tweepy是在python 3.4下安装的,但不知怎的,oauthlib不是,我运行了
$sudo python3-m pip install requests\u oauthlib
,修复了错误,并且能够无错误地导入tweepy

正如Deatangel908所说,pip3本来可能没有错误,但我没有测试它,因为前一行解决了这个问题

一般用途:

Python3.x

sudo pip3 install tweepy
Python2.x

sudo pip install tweepy

你确定你也在使用pip3吗?