chipsalliance / f4pga

FOSS Flow For FPGA

Home Page:https://f4pga.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

conda says that my shell has not been configured even after it has been configured

dsw opened this issue · comments

conda says that by shell has not been configured:

f4pga-install$ xc7/conda/bin/conda activate xc7

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.

but it has been configured:

$ grep 'conda initialize' ${HOME}/.bashrc
# >>> conda initialize >>>
# <<< conda initialize <<<

I'm running Ubuntu Linux in the default setup (bash).

@dsw can you please provide the steps you followed to create the environment? I've seen that happen in CI, but it's typically a transitory issue.

After installing conda, did you restart your shell?

@dsw, I could reproduce the issue in CI (https://github.com/antmicro/f4pga/actions/runs/2380264724), using ubuntu 18.04, 20.04 or 22.04. However, I did find the solution yet.

@dsw, I acknowledge that the setup is non-standard. Without going into much detail, It's a mix of using Conda, having the FPGA_FAM envvar (because of differences between the xc7 and quicklogic families), and "manually" installing the arch-defs packages. All of that is being worked on:

@dsw, actuallly, those code-blocks are treated as "executable snippets" by the CI. "tuttest" parses the sources of the docs, extracts code-blocks and executes them. See https://github.com/chipsalliance/f4pga-examples/blob/main/.github/scripts/install-toolchain.sh#L48 and https://raw.githubusercontent.com/chipsalliance/f4pga-examples/main/docs/getting.rst. Therefore, I don't know how would contributing the "standalone" scripts play with having them tested in CI. Maybe "including" them in rst does work, but I'm unsure.

Nevertheless, you might want to add an "admonition" to the documentation, to provide a "hint" to future readers. There, you might suggest them to save those lines in files and add them to .bashrc. The sources are:

The syntax to add admonitions is the following:

.. HINT::
  Your text goes here.
  
  You can include code-blocks if you want:
  
  .. code-block::
  
    source myscript.sh