/
Laptop setup

Laptop setup

Aug 28, 2023 Stubbs

To get a Python development environment on laptop:

sudo port install py-spyder                   it gets py39

hit a glitch with desroot stage. 
Trying sudo port selfupdate

went through a bunch of macports retro-installation and cleanup and then learned there is an OSX .dmg installer at https://docs.spyder-ide.org/5/installation.html went through a bunch of macports retro-installation and cleanup and then learned there is an OSX .dmg installer at https://docs.spyder-ide.org/5/installation.html 

Did that and copied it to Applications folder. 

Try running it from Applications folder. 

Got spyder running but it can't find path to openai for import


Try running it from Applications folder. 

Got spyder running but it can't find path to openai for import

pip show openai gives this location: 

/usr/local/lib/python3.9/site-packages

I get this error, after much floundering

ImportError: dlopen(/usr/local/lib/python3.9/site-packages/cchardet/_cchardet.cpython-39-darwin.so, 2): no suitable image found.  Did find:
    /usr/local/lib/python3.9/site-packages/cchardet/_cchardet.cpython-39-darwin.so: code signature in (/usr/local/lib/python3.9/site-packages/cchardet/_cchardet.cpython-39-darwin.so) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.


At least let's get command line running. 

python3 version points to 
/usr/local/bin/python3


To install a package for this python path, do 
python3 -m pip install <package>

did

python3 -m pip install notebook

then 
jupyter notebook





Copyright © 2024 The President and Fellows of Harvard College * Accessibility * Support * Request Access * Terms of Use