"将matplotlib.pyplot导入为plt"不工作 - UnicodeDecodeError

时间:2018-01-08 23:21:26

标签: python matplotlib anaconda jupyter-notebook

在Windows7 OS 64位上通过Anaconda2使用Jupyter笔记本,使用GraphLabCreate启动它。执行命令时出现以下错误"将matplotlib.pyplot导入为plt"。

与使用GraphLabCreate的环境变量有什么关系?它们具有以下工具栏命令选择:

 public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    View view = inflater.inflate(R.layout.fragment_discover, container, false);
    if (mListener != null) {
        mListener.onFragmentInteraction("Discover");

    }

    mUser = FirebaseAuth.getInstance().getCurrentUser();
    mUid = mUser.getUid();
    mDatabase = FirebaseDatabase.getInstance();
    mDatabaseref = mDatabase.getReference().child("users");
    suggestedRecycler = view.findViewById(R.id.Suggested_users_recycler);
    mLayoutManager = new LinearLayoutManager(getContext());
    suggestedRecycler.setLayoutManager(mLayoutManager);
    FirebaseRecyclerOptions<User> options = new FirebaseRecyclerOptions.Builder<User>()
            .setQuery(mDatabaseref, User.class).build();

    FirebaseRecyclerAdapter<User, users_holder> adapter = new FirebaseRecyclerAdapter<User, users_holder>(options) {
        @Override
        protected void onBindViewHolder(@NonNull users_holder holder, int position, @NonNull User model) {
                holder.userName.setText(model.getName());
                holder.userInfo.setText(model.getCity() + ", " + model.getCountry());
        }

        @Override
        public users_holder onCreateViewHolder(ViewGroup parent, int viewType) {
            // Create a new instance of the ViewHolder, in this case we are using a custom
            // layout called R.layout.message for each item
            View view = LayoutInflater.from(parent.getContext())
                    .inflate(R.layout.user_in_list, parent, false);

            return new users_holder(view);
        }

    };
    suggestedRecycler.setAdapter(adapter);




    return view;
}

我已经检查了环境变量并且它们如上所列(%PATH%部分除外)。以下是我计算机上的PATH变量:

set "PATH=C:\Users\Owner\Anaconda2;C:\Users\Owner\Anaconda2\Scripts;%PATH%"

以下是整个错误输出:

C:\Users\Owner\Anaconda2;C:\Users\Owner\Anaconda2\Scripts;C:\Users\Owner\Anaconda2\Library\bin;C:\Program Files\R\R-3.4.2\bin\x64

0 个答案:

没有答案