Yes, but...
1) the compressor emits lots of warm air. If your basement or attic is not well ventilated there may be a problem with heat buildup. I've seen some small warehouse grows with interior buildouts and the compressors on top. I've know at least two of the operations that had problems with their mini-splits.
2) above problems may have been more related to cheap Chinese junk than the heat. Stay away from anything that does not use Japanese compressors AND control circuitry. Stick with Frederich, Samsung, Sanyo & Fujitsu or another high-quality unit. You'll pay more up front but it will pay off over time with less problems and more consistent performance.