当前位置:网站首页>Jenkspy package installation
Jenkspy package installation
2022-04-23 18:00:00 【Be happy to study today】
jenkspy Bag installation pit *
use jenkspy Realization arcgis Natural breakpoint method in , There are many problems in the installation process :
A pit : My computer is equipped with Python2.7,Python3.9 Two environments , If direct pip install jenkpy , Then the system displays unable to create…, That means the system can't distinguish pip yes python2 still python3 The path of
How to set up multiple python Environmental Science
Pit two : After solving a problem , I am here python3 Installation in environment python3 -m pip install jenkspy, The error displayed is that the... Cannot be installed tar.gz file , Later it was found that python The version doesn't match ,jenkspy The latest version only supports up to 3.8, It happens that there is no 3.9 Version of ... There is less than 3.9 The version should be able to be installed directly , If it shows runtimeerror, According to python Version to download the corresponding compressed package , Link to :
jenkspy
Pit three : I don't want to reload 3.8 Of python edition , So try to use python2 download , The result shows a new error :Microsoft Visual C++ 9.0 is required.. Then the whole network looks for resources , eureka VCForPython27.msi8 Download , Then the problem is solved successfully .
Pit four : Even though it's loaded with , But the operation will report an error , So I modified core.py After the source code , It's running successfully :
from collections.abc import Iterable
Change it to from collections import Iterable
from math import isfinite
Change it to import math
values = [i for i in values if isfinite(i)]
Change it to values = [i for i in values if np.isfinite(i)]
Code practice
import jenkspy
import random
''' jenks_breaks( [1.3, 7.1, 7.3, 2.3, 3.9, 4.1, 7.8, 1.2, 4.3, 7.3, 5.0, 4.3], nb_class = 3) # Should output (1.2, 2.3, 5.0, 7.8) '''
list_of_values = [1.3, 7.1, 7.3, 2.3, 3.9, 4.1, 7.8, 1.2, 4.3, 7.3, 5.0, 4.3]
breaks = jenkspy.jenks_breaks(list_of_values, nb_class=3)
print(breaks)
The running result is correct :
版权声明
本文为[Be happy to study today]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230545528196.html
边栏推荐
- Identification verification code
- 云原生虚拟化:基于 Kubevirt 构建边缘计算实例
- 纳米技术+AI赋能蛋白质组学|珞米生命科技完成近千万美元融资
- C1 notes [task training part 2]
- Land cover / use data product download
- C language implements memcpy, memset, strcpy, strncpy, StrCmp, strncmp and strlen
- 2022 tea artist (primary) examination simulated 100 questions and simulated examination
- Scikit learn sklearn 0.18 official document Chinese version
- ArcGIS table to excel exceeds the upper limit, conversion failed
- Process management command
猜你喜欢
Qtablewidget usage explanation
Nat Commun|在生物科学领域应用深度学习的当前进展和开放挑战
Halo 开源项目学习(二):实体类与数据表
2022年茶艺师(初级)考试模拟100题及模拟考试
Laser slam theory and practice of dark blue College Chapter 3 laser radar distortion removal exercise
MySQL 中的字符串函数
Chrome浏览器的跨域设置----包含新老版本两种设置
Yolov4 pruning [with code]
Go file operation
Click Cancel to return to the previous page and modify the parameter value of the previous page, let pages = getcurrentpages() let prevpage = pages [pages. Length - 2] / / the data of the previous pag
随机推荐
消费者灰度实现思路
Gaode map search, drag and drop query address
cv_ Solution of mismatch between bridge and opencv
On the method of outputting the complete name of typeID from GCC
Gets the time range of the current week
Fashion classification case based on keras
Operators in C language
Nat commun | current progress and open challenges of applied deep learning in Bioscience
Applet learning notes (I)
MySQL_01_简单数据检索
2022 tea artist (primary) examination simulated 100 questions and simulated examination
Laser slam theory and practice of dark blue College Chapter 3 laser radar distortion removal exercise
Identification verification code
On the problem of V-IF display and hiding
Random number generation of C #
Tell the truth of TS
.105Location
Re expression régulière
C# 网络相关操作
Write a regular