The concept of magnetic poles is only defined for localized magnetic systems, which include permanent magnets (or equivalently their surface currents) and induction coils.
The reason for this is that the north/south pole description of a magnet is, mathematically, a description of the magnetic (dipole) moment of the system, where the dipole approximation to the field is only valid "away" from the system. If the wire is infinite, you can't be "far" from it.
For loop, surface, or volume currents, respectively, the magnetic moment is defined as
$$
\mathbf{m}
=\frac{1}{2}\int_C\mathbf{r}\times I\,d\mathbf{l}
=\frac{1}{2}\int_S\mathbf{r}\times \mathbf{K}\,dS
=\frac{1}{2}\int_V\mathbf{r}\times\mathbf{J}\,dV.
$$
If your loop is an infinite wire, the magnetic moment is infinite and its direction depends on where you place your origin. Both of these tell you that this is an incorrect description of your system.
For a simple solenoid, there is a simple rule to get the north and south poles, which is best explained graphically:
Magnetic field lines come out of the north pole, loop around, and go into the south pole (and you can see that there is no analogue of this for a single long wire!).
Also, as far as this is concerned, solenoids and permanent magnets are much the same. This is because the multiple current-carrying coils of the solenoid look very much like the surface spin currents on a permanent magnet, which are the ones that create its magnetic field. (Where they do differ is in the values of the $\mathbf{H}$ field inside the magnet.)