Learning from Demonstration (LfD) techniques are invaluable for capturing complex human behaviors for robotic arm manipulations, yet they frequently encounter challenges such as avoiding singularities and respecting joint limits when directly applied to robotic systems. These challenges often lead to mechanical non-compliance, inaccuracies, and increased computational demands during control method adjustments. To address these issues, this study introduces a robust approach that integrates Damped Least Squares Inverse Kinematics (DLS-IK) with Probabilistic Movement Primitives (ProMPs). By leveraging DLS-IK to generate kinematically feasible trajectories, and embedding these within the ProMPs framework, our method not only ensures mechanical compliance but also capitalizes on the probabilistic modeling capabilities of ProMPs. This synergy addresses a significant gap in traditional LfD applications-aligning human demonstrations with the mechanical constraints of robotics, independent of the demonstrator's expertise. Our integrated approach refines the LfD process, enabling the generation of precise, reliable, and mechanically compliant movements in robotic arms, thereby reducing the typical inaccuracies and computational burdens associated with conventional LfD methods.