When you install packages using setup.py, the error:

(py37) C:\Users\weda\Phd\python packages\visibility_graph-0.4>python setup.py install
Traceback (most recent call last):
File "setup.py", line 11, in
long_description=readme(),
File "setup.py", line 5, in readme
return f.read()
File "C:\Users\weda\AppData\Local\Continuum\anaconda3\envs\py37\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 1725: character maps to

Here's the solution:  stackoverflow


The difference of ndarray declare.

a = np.array([0,0,24])
a.shape
(3,)
a
array([ 0, 0, 24])
a = np.array((1,2))
a
array([1, 2])
a.shape
(2,)

There's no difference of passing parameter in () or [] format. And the first parameter represent the data value.

numpy.array(objectdtype=Nonecopy=Trueorder='K'subok=Falsendmin=0)

a = np.zeros([0,0,24])
a.shape
(0, 0, 24)
a
array([], shape=(0, 0, 24), dtype=float64)

numpy.zeros(shapedtype=floatorder='C'); The first parameter is shape with [].

The problem when converting list into ndarray: list长度不规则


另一个小问题,赋值问题,a = a.tolist(), dataframe = dataframe.drop([count]); 这些函数返回新的值,需要重新赋值。

list.remove(), the parameter is the value of deleted item and cannot be the index. Otherwise, you need to use 'del' function or 'pop' function. From here.

python package install error and little code bugs的更多相关文章

  1. Package CJK Error: Invalid character code. 问题解决方法--xelatex和pdflatex编译的转换

    Package CJK Error: Invalid character code. 问题解决方法--xelatex和pdflatex编译的转换 解决方法:添加格式说明信息 将下面语句: \docum ...

  2. Python package install血泪史

    [前言][絮絮叨叨篇]:说实话,不是第一次安装Python库了,但是貌似没有特别顺利的时候,可能还是遇到的困难不够多咯.配置环境真是个糟心的事儿,不过作为菜鸟,还是得磨练磨练,毕竟某人云:" ...

  3. MVN package install error javac: invalid target release: 1.8

    现象:---------------------------------[ERROR] Failure executing javac, but could not parse the error:j ...

  4. python pip install error

    使用pip install的时候报错 解决方法是使用如下的命令进行安装 python -m pip install sqlalchemy 升级pip的命令python2 -m pip install ...

  5. Python Django install Error

    Exception:Traceback (most recent call last):  File "/home/djangogirls/myvenv/lib/python3.6/site ...

  6. sudo apt install libreadline-dev Reading package lists... Error!

    luo@luo-ThinkPad-W540:~$ luo@luo-ThinkPad-W540:~$ luo@luo-ThinkPad-W540:~$ luo@luo-ThinkPad-W540:~$ ...

  7. redhat 6安装python 3.7.4报错ModuleNotFoundError: No module named '_ctypes' make: *** [install] Error 1

    问题描述: 今天在测试环境中,为了执行脚本,安装下python3命令,在执行make install的时候报错: ModuleNotFoundError: No module named '_ctyp ...

  8. Reading package lists... Error! 解决方案

    ubuntu 下安装python开发包,执行命令 sudo apt-get install python-dev,报错: Reading package lists... Error! E: Enco ...

  9. qrcode 4.0.4 : Python Package Index

    qrcode 4.0.4 : Python Package Index qrcode 4.0.4 Download qrcode-4.0.4.tar.gz QR Code image generato ...

随机推荐

  1. pycharm(迅雷下载链接)

    pycharm2020迅雷下载链接: https://download.jetbrains.com/python/pycharm-professional-2019.3.3.exe?_ga=2.146 ...

  2. C# 获取鼠标在屏幕上的位置

    获取鼠标位置及鼠标单击了哪个按键.private void GetMousePoint() {     Point ms = Control.MousePosition;     this.label ...

  3. JavaScript自学笔记(2)---function a(){} 和 var a = function(){}的区别(javascript)

    function a(){} 和 var a = function(){}的区别: 学习做浮窗,看到别人的代码里有: window.onresize = function(){ chroX = doc ...

  4. Redis 安装 (未)

    Redis 安装步骤 1. 下载地址 2.  版本选择 3.  配置主要参数 4.  关联操作

  5. KVM命令--优化篇(2)

    1- 为什么要调优 ___ KVM采用全虚拟化技术,全虚拟化要由一个软件来模拟硬件,故有一定的损耗,特别是I/O,因此需要优化. ___ KVM性能优化主要在CPU.内存.I/O这几方面.当然对于这几 ...

  6. 剑指offer-面试题57_2-和为s的连续正数序列-穷举法

    /* 题目: 输入一个整数s,输出所有和为s的连续整数序列. */ /* 思路: 穷举法. */ #include<iostream> #include<cstring> #i ...

  7. L001.PyQt

    초보자를 위한 Python GUI 프로그래밍 - PyQt5 https://wikidocs.net/book/2944 https://freeprog.tistory.com/330?cat ...

  8. 关于Dijk采访的一些感想

    有效的程序员不应该浪费很多时间用于程序调试,他们应该一开始就不要把故障引入! 反复,一遍又一遍的尝试,真的会让人心烦,对于有的问题解决不了,其实有很多原因,写出来的程序其实是非常考验人的细节处理能力的 ...

  9. Spring Boot Starter 开发指南

    Spring Boot Starter是什么? 依赖管理是任何复杂项目的关键部分.以手动的方式来实现依赖管理不太现实,你得花更多时间,同时你在项目的其他重要方面能付出的时间就会变得越少. Spring ...

  10. C语言 typedef struct _STUDENT {}STUDENT,*PSTUDENT;

    #include <stdio.h> #include <stdlib.h> #include <string.h> //给stuct _STUDENT 起一个别名 ...