I do still have an issue though. the process is co...
# caravel
t
I do still have an issue though. the process is complaining about the python3 -m pip install line with the following
Copy code
make[1]: Entering directory '/media/tom/Storage/Linux/repos/projects/caravel_user_project'
python3 -m pip install --upgrade volare
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
make[1]: *** [/media/tom/Storage/Linux/repos/projects/caravel_user_project/caravel/Makefile:1280: install-volare] Error 1
make[1]: Leaving directory '/media/tom/Storage/Linux/repos/projects/caravel_user_project'
make: *** [Makefile:95: pdk-with-volare] Error 2
How should I fix this? I'm reluctant to use the
--break-system-packages
option. Also, I already have the PDK installed in another location which I have been using for my custom analog cells. can I avoid this by using that instead? Ultimately that is the best solution but I was trying to get a baseline working in the meantime. exporting the PDK_ROOT to point to my external PDK seems to allow the
make user_project_wrapper
to do it's thing but it's unclear to me what parts of
make setup
will have not completed due to the above error
m
@Tom You should be ok setting
PDK_ROOT
to your external
PDK
, but you might want to be sure that it matches the
OPEN_PDKS_COMMIT
in the
Makefile
. The only target left in
setup
is
make precheck
t
Thank you @Mitch Bailey!
t
@Tom: Oddly, I just ran across the
error: externally-managed-environment
message today for the first time, by having just installed the most recent Debian into a Raspberry Pi for a personal DIY project. I have no qualms about using
--break-system-packages
myself; if I am running python with a lot of oddball packages, I'll use a
venv
, but most of the time there's some package that I just want on my computer globally, not just inside a local environment. If you have the same kind of devil-may-care attitude about it, then follow the instructions here: https://stackoverflow.com/questions/75608323/how-do-i-solve-error-externally-managed-environment-every-time-i-use-pip-3 to ensure that pip does what you want and stops complaining about it.
t
I may end up using
--break-system-packages
for openlane. My current workaround is working though. Once I'm comfortable with the integration of my openlane flow I will revisit and decide how to handle this
f
Not specific to this but with more recent python versions installing globally is getting harder and the push is towards using virtual envs. This is a bit annoying sometimes (e.g. forget to source the virtual env and such) . So.. and partially documented here https://github.com/emsec/hal/issues/533 what I end up doing is creating a venv for my home user e.g. python -mvenv ~/.venv and adding .venv/bin to my path in .bashrc e.g. export PATH="${HOME}/.venv/bin:${PATH}"