Incompleteness is the most common problem in knowledge graphs and it has prompted many researchers to propose methods to automatically infer missing facts in knowledge graphs, which has gradually developed from the initial TransE, TransH, and DistMult to the current advanced ConvKB. Most of the existing KG completion methods only consider the direct relationship between two entities, namely, the interactive information within one triple, and ignore the connectivity of the knowledge graph structure. In this paper, we develop a convolutional neural network-based model PathConvKB that incorporates neighborhood context and relational paths for representation learning. We adopt a multi-layer message passing scheme proposed by PathCon to iteratively aggregate messages from K-hop neighbor edges of entities. Also, we design a weighted path representation learning method to model each relational path on account of the importance of each edge for a given entity pair. Especially, Combined with the attention mechanism, the neighborhood context between entity pairs is used to measure the importance scores of relational paths and then we integrate the path aggregation feature into the triple matrix. Experiments show that our model PathConvKB has achieved consistent improvements on typical evaluation task for knowledge representation against state-of-the-art methods.