I am required to use a fresh Mac OS with no libraries unless I can find a way to download pandas using a .py file on the fresh VM. How would I do this on MacOS?
            Asked
            
        
        
            Active
            
        
            Viewed 196 times
        
    2 Answers
1
            
            
        You will need to have the entire .tar.gz download in order to install the package, not just a single .py file. As described here as well, once you have the .tar.gz, you can unpack it, navigate to the directory, and execute the setup.py file:
python setup.py install
You can get the latest version of pandas here.
Update after comment/update
Check out using subprocess to issue commands.
import subprocess
import sys
version = 0.24.2
package = 'pandas'
subprocess.call(['sudo', sys.executable, '-m', 'pip', 'install', '{}=={}'.format(package, version)])
 
    
    
        cwalvoort
        
- 1,851
- 1
- 18
- 19
- 
                    I meant something like this (for windows): 'import os cmd = 'sudo pip install pandas' os.system(cmd)' – spookums May 31 '19 at 01:58
 
     
    