Most pilots I've heard or read comments from who flew the P-38 and the P-51 in combat preferred the P-51, but certainly not all.
There is a set of them who thought that the P-38 was an excellent fighter.
As mentioned already, it was a highly regarded and sought-after fighter in North Africa and the Pacific Theater. (It is not a solid argument to say "Sure it was valued in the Pacific because Japanese planes were inferior." The reason that is a fallacious argument is that that all US planes flew in the Pacific -- the P-38 in the Pacific was highly regarded when considering P-51's, P-47's, F4U's, etc. as well. It also is not a solid argument to say "Well, so and so's unit shot down a bunch of P-38's and didn't suffer any losses" or "so and so said that P-38's were easy to shoot down." Initial US forces were completely green. Green pilots flying anything would have had trouble vs. Galland or LW veterans. Some LW pilots didn't think the P-47 was a very good fighter either, yet it battled the LW at its height and acquitted itself well.)
It was also a fighter with enormous range.
It was an excellent fighter-bomber and ground-attack airplane.
There are about four reasons why a lot of pilots disliked the P-38 (poor training on engine failures, lots of engine failures at high altitudes, egregious cockpit heat, and compressibility problems above about 20k). Many of those things were not issues in North Africa and the Pacific, and even in the high-alt European setting, they were solvable without significant redesign (and in fact were solved, but just too late to change opinions that were already formed -- and P-51's were showing up in numbers by that time anyway while folks were screaming for every P-38 they could get in N. Africa).
The P-38 was a decent fighter in WWII, has a record that shows this, and was highly regarded by most US pilots in North Africa and the Pacific and even by some in Europe.