Python:安装包和下载

时间:2018-01-02 23:38:05

标签: python

我正在尝试使用python设置和安装一些软件包。我已经安装了python3和Anaconda。

我的第一个问题是当我输入时:

using System;
using System.IO;
using System.Reflection;
using DrinkUp.Controls;
using DrinkUp.iOS.Renderers;
using MediaPlayer;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;

[assembly: ExportRenderer(typeof(Video), typeof(VideoRenderer))]
namespace DrinkUp.iOS.Renderers
{
public class VideoRenderer : ViewRenderer<Video, UIView>
{
MPMoviePlayerController videoPlayer;
object notification = null;

    void InitVideoPlayer()
    {
        var path = Path.Combine(NSBundle.MainBundle.BundlePath, Element.Source);

        if (!NSFileManager.DefaultManager.FileExists(path)) {
            Console.WriteLine("Video not exist");
            videoPlayer = new MPMoviePlayerController();
            videoPlayer.ControlStyle = MPMovieControlStyle.None;
            videoPlayer.ScalingMode = MPMovieScalingMode.AspectFill;
            videoPlayer.RepeatMode = MPMovieRepeatMode.One;
            videoPlayer.View.BackgroundColor = UIColor.Clear;
            SetNativeControl(videoPlayer.View);
            return;
        }

        // Load the video from the app bundle.
        NSUrl videoURL = new NUrl(path, false);

        // Create and configure the movie player.
        videoPlayer = new MPMoviePlayerController(videoURL);

        videoPlayer.ControlStyle = MPMovieControlStyle.None;
        videoPlayer.ScalingMode = MPMovieScalingMode.AspectFill;
        videoPlayer.RepeatMode = Element.Loop ? MPMovieRepeatMode.One : MPMovieRepeatMode.None;
        videoPlayer.View.BackgroundColor = UIColor.Clear;
        foreach (UIView subView in videoPlayer.View.Subviews) {
            subView.BackgroundColor = UIColor.Clear;
        }

        videoPlayer.PrepareToPlay();
        SetNativeControl(videoPlayer.View);
    }
}

Anaconda说:$ python3 。我应该使用不同的命令还是如何解决这个问题?

我的第二个问题是:我正在尝试根据我收到的这本书安装这四个网站的软件包:

这个说明也在那里:“如果你在Windows上,你应该已经安装了兼容SciPy-stack的Python 3版本。”

当我去复制用于在Windows上安装软件包的行并将其粘贴到我的终端时,它会出现错误:"$" is not an internal or external command

我该如何解决这个问题?

3 个答案:

答案 0 :(得分:1)

  1. 请勿键入$,只需python3

  2. 您提到的软件包已包含在Anaconda python发行版中。

答案 1 :(得分:1)

  1. $通常用于指示应在终端窗口中执行的行的开头。因此,请删除$并写下之后的所有内容。
  2. 如果您安装了Anaconda,那么您应该可以使用conda命令。除了scikit-learn之外,这些软件包应该已经与您的Anaconda发行版一起安装。您可以做的是$ conda install scikit-learn,这应该为您安装scikit-learn
  3. 我建议您在Anaconda网站(https://docs.anaconda.com/anaconda/)查看Anaconda的文档,以了解有关Anaconda,软件包和Python如何工作的更多信息。

答案 2 :(得分:0)

正如emmv所说,在我脑海中还有其他一些事情: 你用Anaconda安装了Python。我假设您没有将Python添加到PATH。你应该检查Anaconda网站是否有任何进一步的分期付款,下载等。 Anaconda使用简单的&#34; conda&#34;毕竟是命令。真的,如果你感到困惑,只需看看Anaconda的网站。