A Carbon Nanotube (CNT) is not a unique compound, but a class of many compounds that are shaped like a tube and made of carbon. They can have different diameters and lenght, and can have tubes inside the tubes (multi-walled CNTs).
To make this model I used Avogadro (a free molecule editing software). Avogadro has a nanotube creator where you can input the parameters and create any kind of nanotube.
I chose to make a nanotube with 6 hexagons at the base, 6 hexagons in between those at the base and that is 6 hexagons tall. You can change these parameters in Avogadro and make a different nanotube.
From Avogadro I exported a .PDB file, which I opened in Chimera (another free software). Finally, I exported the scene as a .STL file for 3D printing.
To print, adjust the scale in your slicing software. make sure the model is flat on the table before printing.