简体   繁体   English

在没有PyPi的情况下安装GitHub软件包

[英]Install GitHub Packages without PyPi

I'm trying to install this Python GoPro Remote Control API from GitHub. 我正在尝试从GitHub安装此Python GoPro远程控制API It's installation instructions say to use PyPi to install it. 安装说明说要使用PyPi进行安装。 As I don't have PyPi, or anything like it as far as I know, installed on my computer, I was wondering if and how you could install something like this manually. 由于我的计算机上没有安装PyPi或据我所知的类似软件,我想知道是否以及如何手动安装类似的软件。 I'd prefer the most if there were just a certain folder I have to put something to install it, but if I have to use Windows Command Line, Powershell, or Python Command Line, I'd be fine with that as well. 如果只需要某个文件夹,我最喜欢安装一些文件夹来安装它,但是如果我必须使用Windows命令行,Powershell或Python命令行,那么我也可以。

You do have pip (the command/module name for the program to interact with PyPi) installed, at least if you are using Python 3.4 + (released March 2014) or Python 2.7.9 + (released December 2014). 至少在使用Python 3.4 +(2014年3月发布)或Python 2.7.9+ (2014年12月发布)的情况下,您确实安装了pip (与PyPi进行交互的程序的命令/模块名称)。 And if not it is high time to update. 如果不是,现在是更新的时候了。

Just do python -m pip install goprocam in a commandline. 只需在命令行中执行python -m pip install goprocam

The -m flag tells python to load the module pip and the following arguments are passed along to it. -m标志告诉python加载模块pip ,并将以下参数传递给它。

Depending on your setup you might have to specify the full path to the Python executable. 根据您的设置,您可能必须指定Python可执行文件的完整路径。

Have a look here for more ways to run pip from the Windows command line. 在这里查看从Windows命令行运行pip更多方法。

PyPi is the Python Package Index. PyPi是Python包索引。 It is an online repository of Python packages. 它是Python软件包的在线存储库。 It is not something you can download. 您无法下载该文件。

What the github page is saying is to download the package from PyPi. github页面说的是从PyPi下载软件包。

This can be done using Pip. 这可以使用Pip完成。 If you have Python, Pip comes with it. 如果您有Python,Pip会附带它。 Otherwise download Python. 否则,请下载Python。

Then in windows command line enter 然后在Windows命令行中输入

pip install goprocam

This command should automatically download the package from PyPi. 此命令应自动从PyPi下载软件包。 You can also download the package from github, though it it will take a little more time. 您也可以从github下载该软件包,尽管这将花费更多时间。 You need to download/install github, add it to your path and then call 您需要下载/安装github,将其添加到您的路径中,然后调用

pip install git+githttps://github.com/KonradIT/gopro-py-api.git

If you get a Pip is not recognized command you will need to add Pip to the environmental variables. 如果您收到无法识别Pip的命令,则需要将Pip添加到环境变量中。 This can easily be found online. 可以在网上轻松找到。

您不需要使用pypi,您可以将repo和cd克隆到其中,并使用goprocam模块

from goprocam import GoProCamera, constants

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM