已安装Python库,但无法导入

时间:2018-12-03 20:29:00

标签: python module pip package

基本上,我一直在尝试使用Spotipy python库,并且尝试了所有方法,但无法使其正常工作(Mac OS)。当我这样做时:

pip install spotipy

我明白了

Cannot uninstall 'six'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

我不确定在那之后我做了什么,但是我做了一些似乎可以将6升级到10.X的事情。但是随后pip show会说它仍然在1.4.1中。我已经花了几个小时了,有人可以帮忙吗!

1 个答案:

答案 0 :(得分:1)

您似乎需要使用virtualenv。这将使您拥有不同的python程序包而不会发生冲突。看一下https://virtualenv.pypa.io/en/latest/