about using the From Pylab Import * error problem based on Python27

Source: Internet
Author: User

# # # Here is my problem record, in case I use # # #

Because the device can only use Pyhton2, when running the program error:

1. Description of the problem:

The most exasperating is: the same file, if another open a new file, copy and paste will not let me run, Error!!! (I am a blowfish of the air)

Look at the picture:

You see the same program is not through!!!!!

2 Solution:

The first type:

This is the way the small group of friends, if you have already searched the Internet, you will see this method. is to add three lines of code where the file begins:

#-*-Coding:utf-8 *

Import Sys
Reload (SYS)
Sys.setdefaultencoding (' Utf-8 ')

This method is only half solved for me. Because using this method, Python2 's own compiler can be passed, but my compiler is Geany, it does not pass. So I thought maybe there was a problem with the compiler, so I used the Visual Studio Code compiler. However, there is no use, still error, but there are hints:

The second type:

With his question, search Google, English. Look at the dialogue in the discussion, saying that this question is matplotlib 2.2. Version 0, said

Https://stackoverflow.com/questions/47179433/python-2-7-functools-lru-cache-does-not-import-although-installed

This is the way I finally solved it.

about using the From Pylab Import * error problem based on Python27

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.