With the rise of social networks, the task of community detection in networks has become increasingly difficult in recent years. In this study, weintroduce a novel approach, named PCMeans, which combines PageRank, hierarchical clustering, and K-means algorithms to tackle this issue.Our technique employs local PageRank to identify the most influential nodes, followed by a hierarchical clustering strategy that determinesthe optimal number of clusters, and ultimately applies K-means learning to swiftly converge to the final community structure. PCMeansis an unsupervised method that is easy to implement, efficient, andsimple, and it addresses three common problems, including the random selection of the initial central node, specification of the number ofclasses K, and slow convergence. Our experimental findings show thatPCMeans can efficiently identify communities and outperforms otherrecent approaches on both real networks and synthetic benchmarks.