The Pavilion is a 15.6" laptop while the Envy is a 17.3" and it has a dedicated nVidia 940m graphics chip that you will not be using. I suppose it boils down to which size screen do you prefer and if the weight matters.
Not sure where you are looking to buy the laptops, but the base model of the 15.6" Pavilion is pretty inexpensive at HP.com with a starting price of $440. It has a Core i5-6200u, 1366x768 resolution screen, 6GB of RAM, and a 1TB hard drive.
You can upgrade the CPU to a Core i7-6500u for $120, but I don't think it is worth it for the extra 300MHz. However, I would upgrade to a 1080p screen for $20 (low quality TN panel) or $40 (better quality IPS panel). Upgrade the RAM if you wish, but the 1TB HDD should be sufficient.
The 17.3" HP Pavilion starts at $590. It comes with a Core i5-6200u, 6GB of RAM, 1600x900 resolution screen and 1TB hard drive. Upgrade the RAM to 8GB for $40 if you wish. I would recommend you upgrade to the 1920x1080 resolution IPS screen for $90. The 1TB HDD should be fine for your needs.