使用Anaconda的PyVimeo [英] Use PyVimeo from Anaconda

查看:153
本文介绍了使用Anaconda的PyVimeo的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Vimeo API.在文档此处中,它只是说要使用 pip install PyVimeo ,它将安装.

I'm trying to use the Vimeo API. In the documentation here it simply says to use pip install PyVimeo and it will install.

不幸的是,这对我不起作用.

Unfortunately that doesn't work for me.

我要完成的工作是能够使用API​​将一堆视频上传到我的PRO帐户.

What I'm trying to accomplish is to be able to use the API to upload a bunch of videos to my PRO account.

我已经尝试了他们的支持,但他们的帮助并不十分.

I've tried their support and they were not terribly helpful.

这是我到目前为止尝试过的...

Here's what I tried so far...

最初我在Anaconda中使用Python 3进行了尝试,该包尝试安装,然后以命令"python setup.py egg_info"失败,并在C:\ Users \ Drew \ AppData \ Local \ Temp中出现错误代码10\ pip-install-y0bim5p8 \ pycurl \

Originally I tried in Anaconda with Python 3, the package tries to install and then ends with Command "python setup.py egg_info" failed with error code 10 in C:\Users\Drew\AppData\Local\Temp\pip-install-y0bim5p8\pycurl\

按照Vimeo的建议,我已经在Anaconda环境中卸载并重新安装了pycurl,但结果相同.

Per Vimeo's recommendation I've uninstalled and reinstalled pycurl in my Anaconda environment but with the same result.

我使用Google时发现了这篇文章,人们说他们可以在这里解决此问题: https://github.com/vimeo/vimeo.py/issues/129

I used Google and found this article where people say they've been able to work around the issue here: https://github.com/vimeo/vimeo.py/issues/129

文章中的重点是,如果您尝试同时下载并安装它,则失败,但是如果先下载然后在本地安装,它应该可以工作.

The punchline in the article was it fails if you try to download and install it at the same time, but if you download it and then install it locally it should work.

我还使用Google多了关于SO的问题,所以我尝试了.

Using Google some more I found this question on SO, so I tried it out.

我确实在本地下载了该软件包,并使用pip进行了安装,但这全在Python 2中,并使用了Anaconda似乎无法自动处理的过时的库(我的猜测是由于安装了本地pip),我试图深入研究本地文件并逐条错误消息更新代码错误消息,以实现与Python 3的兼容性,但这确实推动了我的技能设置-我很惊讶我能完成多少工作,但最终我无所适从弄清楚.

I did download the package locally and installed it using pip but it was all in Python 2 and used outdated libraries that Anaconda didn't seem able to automatically handle (my guess is because of a local pip install) and I tried to dig into the local files and update the code error message by error message to Python 3 compatibility, but this is really pushing my skill set - I was surprised how many I was able to work through, but ultimately I hit a dead on what I could figure out.

尝试解决问题,我将Anaconda切换为Python 2.7,并且能够进行 pip安装PyVimeo ,而令我惊讶的是,它能够下载软件包....

Trying to problem solve I switched my Anaconda to Python 2.7 and I was able to do pip install PyVimeo and to my surprise it was able to download the packages....

但是后来我尝试运行最简单的脚本:

But then I tried to run the simplest of scripts:

import vimeo
print('Your video test is done')

我收到此错误:'ModuleNotFoundError:没有名为'Vimeo'的模块

哪个让我感到困惑,因为我没有使用' Vimeo ',而是使用了< vimeo ',并且在查看' Anaconda3 \ envs \ py2 \Lib \ site-packages \ vimeo 文件夹,然后在所有 .py 文件中,我看不到对名为 Vimeo 的模块的调用.

Which baffles me because I'm not using 'Vimeo' but rather 'vimeo' and when in look in the 'Anaconda3\envs\py2\Lib\site-packages\vimeo' folder and then in all the .py files I see no calls to a module called 'Vimeo.'

说完所有这些,我大约要花8个小时.我不是一个优秀的程序员,但我也很固执,讨厌放弃....有谁对我如何使它起作用有任何想法或建议?

And when it's all said and done I'm ~8 hours into this. I'm not that great of a programmer but I'm also stubborn and hate giving up.... does anyone have any ideas or suggestions on how I can get this to work?

提前谢谢!

推荐答案

几天前,我遇到了同样的问题.问题在于PYVimeo软件包中的pycurl版本的要求,该版本与python3不兼容,我通过安装没有依赖项的PyVimeo来解决了这个问题.pip install PyVimeo-无依赖

I had the same problem a few days ago. the problem is in the requirements of the pycurl version in the PYVimeo package, which is not compatible with python3, I solved this by installing PyVimeo without dependencies. pip install PyVimeo --no-dependencies

,然后以最新版本安装依赖项pip install pycurl(如果不起作用,请在此处下载以下代码: https://www.lfd.uci.edu/~gohlke/pythonlibs/)pip安装pycurlpip安装tuspy点安装请求

and later installing the dependencies in its latest version pip install pycurl (if this not work, download the whl here: https://www.lfd.uci.edu/~gohlke/pythonlibs/) pip install pycurl pip install tuspy pip install requests

这篇关于使用Anaconda的PyVimeo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆