I am having some trouble getting my artiq installation working. I have been following the manual for installing artiq using conda on a windows 10 machine and am able to get to section "8.2 Adding an argument". After performing the edit to the file and attempting the command-line client triggered repository scan using the command specified, I get the following error:

(artiq) C:\Users\bmcmahon6\Documents\__coding\artiq\artiq-master>artiq_client scan_repository
Traceback (most recent call last):
  File "C:\Users\bmcmahon6\Anaconda3\envs\artiq\Scripts\artiq_client-script.py", line 5, in <module>
    from artiq.frontend.artiq_client import main
  File "C:\Users\bmcmahon6\Anaconda3\envs\artiq\lib\site-packages\artiq\frontend\artiq_client.py", line 18, in <module>
    from prettytable import PrettyTable
  File "C:\Users\bmcmahon6\Anaconda3\envs\artiq\lib\site-packages\prettytable\__init__.py", line 3, in <module>
    from .prettytable import (
  File "C:\Users\bmcmahon6\Anaconda3\envs\artiq\lib\site-packages\prettytable\prettytable.py", line 250
    raise Exception(f"Index {index} is invalid, must be an integer or slice")
                                                                           ^
SyntaxError: invalid syntax

After doing some investigating, it appears that the artiq is installed from conda using the conda install function call. The installation includes use of python-3.5.6 version. However, the version of module prettytable that is installed includes code that uses syntax introduced in python-3.6. This can be seen in the line of code quoted above where they use the new style of string formatting, specifically, f"Index {index} is invalid, must be an integer or slice". Did I incorrectly install something? It seems that reverting the prettytable module might fix the issue temporarily, assuming there aren't other version clashing problems.

Additionally, I attached the code below for creation of the conda env with the artiq module installation:

(base) C:\WINDOWS\system32>conda create -n artiq artiq
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\Users\bmcmahon6\Anaconda3\envs\artiq

  added / updated specs:
    - artiq


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    artiq-5.7151.76370714      |                0         519 KB  https://conda.m-labs.hk/artiq
    binutils-or1k-linux-2.27   |       h93a10e1_6         8.9 MB  https://conda.m-labs.hk/artiq
    ca-certificates-2021.1.19  |       haa95532_0         122 KB
    cffi-1.11.5                |   py35h74b6da3_1         211 KB
    h5py-2.8.0                 |   py35h3bdd7fb_2         664 KB
    hdf5-1.10.2                |       hac2f561_1        12.2 MB
    intel-openmp-2019.4        |              245         1.4 MB
    libgit2-0.27.8             |       hfac1375_0         650 KB  conda-forge
    llvmlite-artiq-0.23.0.dev  |           py35_5         7.4 MB  https://conda.m-labs.hk/artiq
    mkl-2018.0.3               |                1       112.6 MB
    mkl_fft-1.0.6              |   py35hdbbee80_0         103 KB
    mkl_random-1.0.1           |   py35h77b88f5_1         223 KB
    numpy-1.15.2               |   py35ha559c80_0          47 KB
    numpy-base-1.15.2          |   py35h8128ebf_0         3.2 MB
    openssl-1.1.1i             |       h2bbff1b_0         4.8 MB
    pip-10.0.1                 |           py35_0         1.6 MB
    prettytable-2.0.0          |     pyhd8ed1ab_0          22 KB  conda-forge
    pygit2-0.27.1              |   py35hfa6e2cd_0         646 KB  conda-forge
    pyqt-5.9.2                 |   py35h6538335_2         3.3 MB
    pyqtgraph-0.11.0           |             py_0         515 KB
    python-3.5.6               |       he025d50_0        14.5 MB
    python-dateutil-2.8.1      |     pyhd3eb1b0_0         221 KB
    python-levenshtein-0.12.0  |           py35_0          73 KB  conda-forge
    pythonparser-1.3           |                0          48 KB  https://conda.m-labs.hk/artiq
    quamash-0.6.1              |                0          16 KB  https://conda.m-labs.hk/artiq
    regex-2018.08.29           |   py35hfa6e2cd_0         295 KB
    scipy-1.1.0                |   py35h4f6bf74_1        10.3 MB
    setuptools-40.2.0          |           py35_0         497 KB
    sip-4.19.8                 |   py35h6538335_0         263 KB
    sipyco-1.2                 |                0          26 KB  https://conda.m-labs.hk/artiq
    six-1.15.0                 |     pyhd3eb1b0_0          13 KB
    tbb-2020.3                 |       h74a9793_0         156 KB
    tbb4py-2018.0.5            |   py35he980bc4_0          70 KB
    vc-14.2                    |       h21ff451_1           8 KB
    vs2015_runtime-14.27.29016 |       h5e58377_2        1007 KB
    wheel-0.36.2               |     pyhd3eb1b0_0          33 KB
    wincertstore-0.2           |   py35hfebbdb8_0          14 KB
    ------------------------------------------------------------
                                           Total:       186.5 MB

The following NEW packages will be INSTALLED:

  artiq              artiq/noarch::artiq-5.7151.76370714-0
  binutils-or1k-lin~ artiq/win-64::binutils-or1k-linux-2.27-h93a10e1_6
  blas               pkgs/main/win-64::blas-1.0-mkl
  ca-certificates    pkgs/main/win-64::ca-certificates-2021.1.19-haa95532_0
  certifi            pkgs/main/noarch::certifi-2020.6.20-pyhd3eb1b0_3
  cffi               pkgs/main/win-64::cffi-1.11.5-py35h74b6da3_1
  curl               pkgs/main/win-64::curl-7.71.1-h2a8f88b_1
  h5py               pkgs/main/win-64::h5py-2.8.0-py35h3bdd7fb_2
  hdf5               pkgs/main/win-64::hdf5-1.10.2-hac2f561_1
  icc_rt             pkgs/main/win-64::icc_rt-2019.0.0-h0cc432a_1
  icu                pkgs/main/win-64::icu-58.2-ha925a31_3
  intel-openmp       pkgs/main/win-64::intel-openmp-2019.4-245
  jpeg               pkgs/main/win-64::jpeg-9b-hb83a4c4_2
  krb5               pkgs/main/win-64::krb5-1.18.2-hc04afaa_0
  libcurl            pkgs/main/win-64::libcurl-7.71.1-h2a8f88b_1
  libgit2            conda-forge/win-64::libgit2-0.27.8-hfac1375_0
  libiconv           pkgs/main/win-64::libiconv-1.15-h1df5818_7
  libpng             pkgs/main/win-64::libpng-1.6.37-h2a8f88b_0
  libssh2            pkgs/main/win-64::libssh2-1.9.0-h7a1dbc1_1
  llvmlite-artiq     artiq/win-64::llvmlite-artiq-0.23.0.dev-py35_5
  mkl                pkgs/main/win-64::mkl-2018.0.3-1
  mkl_fft            pkgs/main/win-64::mkl_fft-1.0.6-py35hdbbee80_0
  mkl_random         pkgs/main/win-64::mkl_random-1.0.1-py35h77b88f5_1
  numpy              pkgs/main/win-64::numpy-1.15.2-py35ha559c80_0
  numpy-base         pkgs/main/win-64::numpy-base-1.15.2-py35h8128ebf_0
  openssl            pkgs/main/win-64::openssl-1.1.1i-h2bbff1b_0
  pip                pkgs/main/win-64::pip-10.0.1-py35_0
  prettytable        conda-forge/noarch::prettytable-2.0.0-pyhd8ed1ab_0
  pycparser          pkgs/main/noarch::pycparser-2.20-py_2
  pygit2             conda-forge/win-64::pygit2-0.27.1-py35hfa6e2cd_0
  pyqt               pkgs/main/win-64::pyqt-5.9.2-py35h6538335_2
  pyqtgraph          pkgs/main/noarch::pyqtgraph-0.11.0-py_0
  python             pkgs/main/win-64::python-3.5.6-he025d50_0
  python-dateutil    pkgs/main/noarch::python-dateutil-2.8.1-pyhd3eb1b0_0
  python-levenshtein conda-forge/win-64::python-levenshtein-0.12.0-py35_0
  pythonparser       artiq/noarch::pythonparser-1.3-0
  qt                 pkgs/main/win-64::qt-5.9.7-vc14h73c81de_0
  quamash            artiq/noarch::quamash-0.6.1-0
  regex              pkgs/main/win-64::regex-2018.08.29-py35hfa6e2cd_0
  scipy              pkgs/main/win-64::scipy-1.1.0-py35h4f6bf74_1
  setuptools         pkgs/main/win-64::setuptools-40.2.0-py35_0
  sip                pkgs/main/win-64::sip-4.19.8-py35h6538335_0
  sipyco             artiq/noarch::sipyco-1.2-0
  six                pkgs/main/noarch::six-1.15.0-pyhd3eb1b0_0
  sqlite             pkgs/main/win-64::sqlite-3.33.0-h2a8f88b_0
  tbb                pkgs/main/win-64::tbb-2020.3-h74a9793_0
  tbb4py             pkgs/main/win-64::tbb4py-2018.0.5-py35he980bc4_0
  vc                 pkgs/main/win-64::vc-14.2-h21ff451_1
  vs2015_runtime     pkgs/main/win-64::vs2015_runtime-14.27.29016-h5e58377_2
  wcwidth            pkgs/main/noarch::wcwidth-0.2.5-py_0
  wheel              pkgs/main/noarch::wheel-0.36.2-pyhd3eb1b0_0
  wincertstore       pkgs/main/win-64::wincertstore-0.2-py35hfebbdb8_0
  zlib               pkgs/main/win-64::zlib-1.2.11-h62dcd97_4


Proceed ([y]/n)? y


Downloading and Extracting Packages
mkl-2018.0.3         | 112.6 MB  | ############################################################################ | 100%
six-1.15.0           | 13 KB     | ############################################################################ | 100%
mkl_random-1.0.1     | 223 KB    | ############################################################################ | 100%
python-dateutil-2.8. | 221 KB    | ############################################################################ | 100%
wheel-0.36.2         | 33 KB     | ############################################################################ | 100%
cffi-1.11.5          | 211 KB    | ############################################################################ | 100%
pygit2-0.27.1        | 646 KB    | ############################################################################ | 100%
artiq-5.7151.7637071 | 519 KB    | ############################################################################ | 100%
sip-4.19.8           | 263 KB    | ############################################################################ | 100%
python-3.5.6         | 14.5 MB   | ############################################################################ | 100%
python-levenshtein-0 | 73 KB     | ############################################################################ | 100%
libgit2-0.27.8       | 650 KB    | ############################################################################ | 100%
pyqt-5.9.2           | 3.3 MB    | ############################################################################ | 100%
wincertstore-0.2     | 14 KB     | ############################################################################ | 100%
tbb4py-2018.0.5      | 70 KB     | ############################################################################ | 100%
intel-openmp-2019.4  | 1.4 MB    | ############################################################################ | 100%
numpy-base-1.15.2    | 3.2 MB    | ############################################################################ | 100%
quamash-0.6.1        | 16 KB     | ############################################################################ | 100%
tbb-2020.3           | 156 KB    | ############################################################################ | 100%
pythonparser-1.3     | 48 KB     | ############################################################################ | 100%
sipyco-1.2           | 26 KB     | ############################################################################ | 100%
openssl-1.1.1i       | 4.8 MB    | ############################################################################ | 100%
scipy-1.1.0          | 10.3 MB   | ############################################################################ | 100%
pip-10.0.1           | 1.6 MB    | ############################################################################ | 100%
pyqtgraph-0.11.0     | 515 KB    | ############################################################################ | 100%
vc-14.2              | 8 KB      | ############################################################################ | 100%
regex-2018.08.29     | 295 KB    | ############################################################################ | 100%
binutils-or1k-linux- | 8.9 MB    | ############################################################################ | 100%
llvmlite-artiq-0.23. | 7.4 MB    | ############################################################################ | 100%
hdf5-1.10.2          | 12.2 MB   | ############################################################################ | 100%
mkl_fft-1.0.6        | 103 KB    | ############################################################################ | 100%
setuptools-40.2.0    | 497 KB    | ############################################################################ | 100%
numpy-1.15.2         | 47 KB     | ############################################################################ | 100%
vs2015_runtime-14.27 | 1007 KB   | ############################################################################ | 100%
h5py-2.8.0           | 664 KB    | ############################################################################ | 100%
prettytable-2.0.0    | 22 KB     | ############################################################################ | 100%
ca-certificates-2021 | 122 KB    | ############################################################################ | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate artiq
#
# To deactivate an active environment, use
#
#     $ conda deactivate

    brijmac It seems that reverting the prettytable module might fix the issue temporarily, assuming there aren't other version clashing problems.

    The manual recommends using Nix for a reason 🙂
    What prettytable version did you install to solve the problem? I can try to pin the version in ARTIQ's conda dependency list; though considering how broken the conda solver is, this is not guaranteed to work.

      sb10q I haven't made the attempt yet to fix it; I just noticed that might be an option. I may try to go the Nix route, but I'll have to get a linux box installed to get things going.

      7 months later

      Hi!

      We have found the same problem with the legacy ARTIQ5. We have a working artiq 5.7112 version (with a prettytable 0.7.2 version), we need another ARTIQ5 to be installed in a different computer, but the legacy ARTIQ5 install package has the same prettytable problem (version 2.2.1) when we try to run artiq_client. We get the same error message.

      @sb10q Which would be the recommended solution to this issue?

      @brijmac Did you manage to solve the problem by installing another prettytable version? In case you solved it, which version of prettytable did you use?

      Thank you!

        fdomgon @sb10q Which would be the recommended solution to this issue?

        Obviously the recommended solution, as documented in the manual, is to install an operating system instead of Windoze and switch to Nix packages (or at least a package manager that works).

        Failing that, you can try forcing the conda garbage to use the same packages as the CI system:
        https://git.m-labs.hk/M-Labs/nix-scripts/src/branch/master/artiq-fast/windows/conda_win-64_packages-5.nix
        https://git.m-labs.hk/M-Labs/nix-scripts/src/branch/master/artiq-fast/windows/conda_noarch_packages-5.nix

        The CI system enforces this by blocking conda's network access and creating a fake conda channel with only those packages. You may or may not have to go to such extremes, if you are lucky downloading the prettytable package file and installing it manually will work, or simply conda install prettytable=0.7.2.

          sb10q

          Hi! We used the conda install command to downgrade the prettytable version in our ARTIQ5 environment and now it is working!

          Thanks a lot for your answer.