Giter VIP home page Giter VIP logo

Comments (1)

Victrid avatar Victrid commented on September 3, 2024 1

Under windows with Chinese, python will try to read the file with GBK when encoding is not assigned., but the README.md file is created under UTF-8. That caused the error you mentioned.
Please download the source file, try changing the setup.py in the root folder

def readme():
    with open(os.path.join(DIRECTORY, "README.md")) as f:
        return f.read()

to

def readme():
    with open(os.path.join(DIRECTORY, "README.md"),encoding = 'UTF-8') as f:
        return f.read()

And avoid installing them into a folder with Chinese character.
You may install under the README.md's instruction, which is pip3 install .
If this worked, you can create a pull request.
When you edited the README.md, setup.py or any other codes, please save it with Unicode, not GBK 18030.


中文windows环境下的python默认会用GBK编码来读文件。但是这个README.md是以UTF-8保存的。这样就导致了你看到的那些错误。
请下载这个存储库,并将根目录的 setup.py

def readme():
    with open(os.path.join(DIRECTORY, "README.md")) as f:
        return f.read()

改成

def readme():
    with open(os.path.join(DIRECTORY, "README.md"),encoding = 'UTF-8') as f:
        return f.read()

在不要安装到有中文字符的目录。
您可以按照README.md里面的内容来安装它。也就是说,pip3 install .
如果这样可行,请您提出pull request,来帮助其它的本地化用户。
如果您要修改任何文件,请您用Unicode编码,而不是GBK-18030来保存。

from dpt-rp1-py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.