XanaduAI / strawberryfields

Strawberry Fields is a full-stack Python library for designing, simulating, and optimizing continuous variable (CV) quantum optical circuits.
https://strawberryfields.ai
Apache License 2.0
747 stars 186 forks source link

Strawberry fields installation issue #565

Closed LorcanConlon closed 3 years ago

LorcanConlon commented 3 years ago

Hi,

I am trying to implement a very simple code on strawberry fields on Spyder python 3.7:

'''import strawberryfields as sf

from strawberryfields.ops import *

import numpy as np from numpy import pi, sqrt

prog = sf.Program(3)'''

However even this simple code returns the following code:

'''ImportError: cannot import name 'List' from 'numba.typed' (//anaconda3/lib/python3.7/site-packages/numba/typed/init.py)'''

What is this issue? I think I might have the wrong numba installed or something. However I get the same error on jupyter notebook.

josh146 commented 3 years ago

Hi @LorcanConlon! What version of Numba do you currently have installed? Could you try upgrading your Numba installation?

LorcanConlon commented 3 years ago

I have the most recent version of Numba I think, as I ran pip3 install numba

co9olguy commented 3 years ago

Hi @LorcanConlon, could you post the output of running sf.about() from the Python interpretor or jupyter cell, as well as the result of running pip freeze from the terminal (same environment you used to launch this code)?

LorcanConlon commented 3 years ago

Hi, the result of running pip freeze:

absl-py @ file:///opt/concourse/worker/volumes/live/ea498b4d-972d-4c4a-7408-e0d5d1df48c7/volume/absl-py_1603893130574/work
alabaster==0.7.12
anaconda-client==1.7.2
anaconda-navigator==1.10.0
anaconda-project==0.8.3
antlr4-python3-runtime==4.8
appdirs==1.4.4
appnope==0.1.0
appscript==1.0.1
asn1crypto==0.24.0
astor==0.8.1
astroid==2.2.5
astropy==3.2.1
atomicwrites==1.3.0
attrs==19.1.0
Babel==2.7.0
backcall==0.1.0
backports.functools-lru-cache==1.5
backports.os==0.1.1
backports.shutil-get-terminal-size==1.0.0
backports.tempfile==1.0
backports.weakref==1.0.post1
beautifulsoup4==4.7.1
bitarray==0.9.3
bkcharts==0.2
bleach==3.1.0
bokeh==1.2.0
boto==2.49.0
Bottleneck==1.2.1
certifi==2020.12.5
cffi==1.12.3
chardet==3.0.4
Click==7.0
cloudpickle==1.2.1
clyent==1.2.2
colorama==0.4.1
conda==4.9.2
conda-build==3.18.8
conda-package-handling==1.3.11
conda-verify==3.4.2
contextlib2==0.5.5
cryptography==2.7
cycler==0.10.0
Cython==0.29.12
cytoolz==0.10.0
dask==2.1.0
decorator==4.4.0
defusedxml==0.6.0
distributed==2.1.0
docutils==0.14
entrypoints==0.3
et-xmlfile==1.0.1
fastcache==1.1.0
filelock==3.0.12
Flask==1.1.1
fsspec @ file:///tmp/build/80754af9/fsspec_1602684995936/work
future==0.17.1
gast @ file:///tmp/build/80754af9/gast_1597433534803/work
gevent==1.4.0
glob2==0.7
gmpy2==2.0.8
greenlet==0.4.15
grpcio==1.16.1
h5py==2.9.0
hafnian==0.6.1
heapdict==1.0.0
html5lib==1.0.1
idna==2.8
imageio==2.5.0
imagesize==1.1.0
importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1602276842396/work
ipykernel==5.1.1
ipython==7.6.1
ipython-genutils==0.2.0
ipywidgets==7.5.0
isort==4.3.21
itsdangerous==1.1.0
jdcal==1.4.1
jedi==0.13.3
Jinja2==2.10.1
joblib==0.13.2
json5==0.8.4
jsonschema==3.0.1
jupyter==1.0.0
jupyter-client==5.3.1
jupyter-console==6.0.0
jupyter-core==4.5.0
jupyterlab==1.0.2
jupyterlab-server==1.0.0
Keras-Applications @ file:///tmp/build/80754af9/keras-applications_1594366238411/work
Keras-Preprocessing==1.1.0
keyring==18.0.0
kiwisolver==1.1.0
lazy-object-proxy==1.4.1
libarchive-c==2.8
lief==0.9.0
llvmlite==0.29.0
locket==0.2.0
lxml==4.3.4
Markdown @ file:///opt/concourse/worker/volumes/live/ab9d027b-aa96-4f3e-4a67-57db8504e6b6/volume/markdown_1605111065503/work
MarkupSafe==1.1.1
matplotlib==3.1.0
mccabe==0.6.1
mistune==0.8.4
mkl-fft==1.0.12
mkl-random==1.0.2
mkl-service==2.0.2
mock==3.0.5
more-itertools==7.0.0
mpmath==1.1.0
msgpack==0.6.1
multipledispatch==0.6.0
navigator-updater==0.2.1
nbconvert==5.5.0
nbformat==4.4.0
networkx==2.3
nltk==3.4.4
nose==1.3.7
notebook==6.0.0
numba==0.44.1
numexpr==2.6.9
numpy==1.20.2
numpydoc==0.9.1
olefile==0.46
openpyxl==2.6.2
packaging==19.0
pandas==0.24.2
pandocfilters==1.4.2
parso==0.5.0
partd==1.0.0
path.py==12.0.1
pathlib2==2.3.4
patsy==0.5.1
pep8==1.7.1
pexpect==4.7.0
pickleshare==0.7.5
Pillow==6.1.0
pkginfo==1.5.0.1
pluggy==0.12.0
ply==3.11
prometheus-client==0.7.1
prompt-toolkit==2.0.9
protobuf==3.11.4
psutil==5.6.3
ptyprocess==0.6.0
py==1.8.0
pycodestyle==2.5.0
pycosat==0.6.3
pycparser==2.19
pycrypto==2.6.1
pycurl==7.43.0.3
pyflakes==2.1.1
Pygments==2.4.2
pylint==2.3.1
pyodbc==4.0.26
pyOpenSSL==19.0.0
pyparsing==2.4.0
pyrsistent==0.14.11
PySocks==1.7.0
pytest==5.0.1
pytest-arraydiff==0.3
pytest-astropy==0.5.0
pytest-doctestplus==0.3.0
pytest-openfiles==0.3.2
pytest-remotedata==0.3.1
python-dateutil==2.8.0
pytz==2019.1
PyWavelets==1.0.3
PyYAML==5.1.1
pyzmq==18.0.0
QtAwesome==0.5.7
qtconsole==4.5.1
QtPy==1.8.0
quantum-blackbird==0.3.0
repoze.lru==0.7
requests==2.22.0
rope==0.14.0
ruamel-yaml==0.15.46
scikit-image==0.15.0
scikit-learn==0.21.2
scipy==1.3.0
seaborn==0.9.0
Send2Trash==1.5.0
simplegeneric==0.8.1
singledispatch==3.4.0.3
six==1.12.0
snowballstemmer==1.9.0
sortedcollections==1.1.2
sortedcontainers==2.1.0
soupsieve==1.8
Sphinx==2.1.2
sphinxcontrib-applehelp==1.0.1
sphinxcontrib-devhelp==1.0.1
sphinxcontrib-htmlhelp==1.0.2
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.2
sphinxcontrib-serializinghtml==1.1.3
sphinxcontrib-websupport==1.1.2
spyder==3.3.6
spyder-kernels==0.5.1
SQLAlchemy==1.3.5
statsmodels==0.10.0
-e git+https://github.com/XanaduAI/strawberryfields.git@a0f8b5ba03d56b43cf3cc744e54886cba6fc9eca#egg=StrawberryFields
sympy==1.7.1
tables==3.5.2
tblib==1.4.0
tensorboard==1.14.0
tensorflow==1.14.0
tensorflow-estimator==1.14.0
termcolor==1.1.0
terminado==0.8.2
testpath==0.4.2
thewalrus==0.14.0
toml==0.10.2
toolz==0.10.0
tornado==6.0.3
tqdm==4.32.1
traitlets==4.3.2
unicodecsv==0.14.1
urllib3==1.26.4
wcwidth==0.1.7
webencodings==0.5.1
Werkzeug==0.15.4
widgetsnbextension==3.5.0
wrapt==1.11.2
wurlitzer==1.0.2
xlrd==1.2.0
XlsxWriter==1.1.8
xlwings==0.15.8
xlwt==1.3.0
xmltodict==0.12.0
zict==1.0.0
zipp==0.5.1

And from running sf.about():

//anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
//anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
//anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
//anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
//anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
//anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
//anaconda3/lib/python3.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.26.4) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)
//anaconda3/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
//anaconda3/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
//anaconda3/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
//anaconda3/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
//anaconda3/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
//anaconda3/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-0490390d2576> in <module>
----> 1 import strawberryfields as sf
      2 sf.about()

~/strawberryfields/strawberryfields/strawberryfields/strawberryfields/__init__.py in <module>
     22     :target: javascript:void(0);
     23 """
---> 24 from . import apps
     25 from ._version import __version__
     26 from .cli import ping

~/strawberryfields/strawberryfields/strawberryfields/strawberryfields/apps/__init__.py in <module>
     34 import strawberryfields.apps.plot
     35 import strawberryfields.apps.points
---> 36 import strawberryfields.apps.qchem
     37 import strawberryfields.apps.sample
     38 import strawberryfields.apps.similarity

~/strawberryfields/strawberryfields/strawberryfields/strawberryfields/apps/qchem/__init__.py in <module>
     32     read_gamess
     33 """
---> 34 import strawberryfields.apps.qchem.dynamics
     35 import strawberryfields.apps.qchem.vibronic
     36 from strawberryfields.apps.qchem.utils import duschinsky, read_gamess

~/strawberryfields/strawberryfields/strawberryfields/strawberryfields/apps/qchem/dynamics.py in <module>
     71 
     72 import strawberryfields as sf
---> 73 from strawberryfields.utils import operation
     74 
     75 

~/strawberryfields/strawberryfields/strawberryfields/strawberryfields/utils/__init__.py in <module>
     19 from .random_numbers_matrices import *
     20 from .states import *
---> 21 from .program_functions import *
     22 from .post_processing import *

~/strawberryfields/strawberryfields/strawberryfields/strawberryfields/utils/program_functions.py in <module>
     26 import numpy as np
     27 
---> 28 from strawberryfields.engine import LocalEngine
     29 from strawberryfields.program_utils import Command
     30 from strawberryfields.ops import Gate, Channel, Ket

~/strawberryfields/strawberryfields/strawberryfields/strawberryfields/engine.py in <module>
     25 import numpy as np
     26 
---> 27 from strawberryfields.api import Connection, Job, Result
     28 from strawberryfields.api.job import FailedJobError
     29 from strawberryfields.logger import create_logger

~/strawberryfields/strawberryfields/strawberryfields/strawberryfields/api/__init__.py in <module>
     21 """
     22 
---> 23 from .connection import Connection, RequestFailedError
     24 from .devicespec import DeviceSpec
     25 from .job import InvalidJobOperationError, Job, JobStatus

~/strawberryfields/strawberryfields/strawberryfields/strawberryfields/api/connection.py in <module>
     24 from strawberryfields._version import __version__
     25 from strawberryfields.configuration import load_config
---> 26 from strawberryfields.io import to_blackbird
     27 from strawberryfields.logger import create_logger
     28 from strawberryfields.program import Program

~/strawberryfields/strawberryfields/strawberryfields/strawberryfields/io.py in <module>
     24 
     25 import blackbird
---> 26 import strawberryfields.program as sfp
     27 import strawberryfields.parameters as sfpar
     28 from . import ops

~/strawberryfields/strawberryfields/strawberryfields/strawberryfields/program.py in <module>
     60 
     61 import strawberryfields.circuitdrawer as sfcd
---> 62 from strawberryfields.compilers import Compiler, compiler_db
     63 import strawberryfields.program_utils as pu
     64 

~/strawberryfields/strawberryfields/strawberryfields/strawberryfields/compilers/__init__.py in <module>
     38 """
     39 from .compiler import Compiler, Ranges
---> 40 from .xcov import Xcov
     41 from .xstrict import Xstrict
     42 from .xunitary import Xunitary

~/strawberryfields/strawberryfields/strawberryfields/strawberryfields/compilers/xcov.py in <module>
     21 
     22 import strawberryfields as sf
---> 23 from strawberryfields.decompositions import takagi
     24 from strawberryfields.program_utils import CircuitError, Command
     25 import strawberryfields.ops as ops

~/strawberryfields/strawberryfields/strawberryfields/strawberryfields/decompositions.py in <module>
     24 from thewalrus.symplectic import sympmat
     25 
---> 26 from .backends.shared_ops import changebasis
     27 
     28 

~/strawberryfields/strawberryfields/strawberryfields/strawberryfields/backends/__init__.py in <module>
     82 from .base import BaseBackend, BaseFock, BaseGaussian, BaseBosonic, ModeMap
     83 from .gaussianbackend import GaussianBackend
---> 84 from .fockbackend import FockBackend
     85 from .bosonicbackend import BosonicBackend
     86 from .states import BaseState, BaseGaussianState, BaseFockState, BaseBosonicState

~/strawberryfields/strawberryfields/strawberryfields/strawberryfields/backends/fockbackend/__init__.py in <module>
     14 r"""Fock simulator backend"""
     15 
---> 16 from .backend import FockBackend

~/strawberryfields/strawberryfields/strawberryfields/strawberryfields/backends/fockbackend/backend.py in <module>
     22 from strawberryfields.backends.states import BaseFockState
     23 
---> 24 from .circuit import Circuit
     25 
     26 indices = string.ascii_lowercase

~/strawberryfields/strawberryfields/strawberryfields/strawberryfields/backends/fockbackend/circuit.py in <module>
     25 from scipy.special import factorial as bang
     26 from numba import jit
---> 27 from numba.typed import List
     28 
     29 from . import ops

ImportError: cannot import name 'List' from 'numba.typed' (//anaconda3/lib/python3.7/site-packages/numba/typed/__init__.py)

I really appreciate this help :)

co9olguy commented 3 years ago

Hi @LorcanConlon,

It appears the version of numba that you have (==0.44.1) is lower than that required by Strawberry Fields (==0.48.0). Could you try pip install numba==0.48.0 or pip install --upgrade numba and see if that fixes the problem?

LorcanConlon commented 3 years ago

I think this might be the issue. I cannot upgrade my numba. I get the following error:

ERROR: Cannot uninstall 'llvmlite'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

And after running

pip install llvmlite --ignore installed

I get the following error:

 ERROR: Command errored out with exit status 1:
     command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/h7/4qbqnhgn263dd57tnng1d_tc0000gn/T/pip-install-3yilzwzn/llvmlite_99070c964ffb4ede8c0c7e306a22fc87/setup.py'"'"'; __file__='"'"'/private/var/folders/h7/4qbqnhgn263dd57tnng1d_tc0000gn/T/pip-install-3yilzwzn/llvmlite_99070c964ffb4ede8c0c7e306a22fc87/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/h7/4qbqnhgn263dd57tnng1d_tc0000gn/T/pip-record-vyl0ivcr/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/llvmlite
         cwd: /private/var/folders/h7/4qbqnhgn263dd57tnng1d_tc0000gn/T/pip-install-3yilzwzn/llvmlite_99070c964ffb4ede8c0c7e306a22fc87/
    Complete output (29 lines):
    running install
    running build
    got version from file /private/var/folders/h7/4qbqnhgn263dd57tnng1d_tc0000gn/T/pip-install-3yilzwzn/llvmlite_99070c964ffb4ede8c0c7e306a22fc87/llvmlite/_version.py {'version': '0.31.0', 'full': 'fe7d985f6421d87f613bd414479d29d912771562'}
    running build_ext
    /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 /private/var/folders/h7/4qbqnhgn263dd57tnng1d_tc0000gn/T/pip-install-3yilzwzn/llvmlite_99070c964ffb4ede8c0c7e306a22fc87/ffi/build.py
    LLVM version... Traceback (most recent call last):
      File "/private/var/folders/h7/4qbqnhgn263dd57tnng1d_tc0000gn/T/pip-install-3yilzwzn/llvmlite_99070c964ffb4ede8c0c7e306a22fc87/ffi/build.py", line 105, in main_posix
        out = subprocess.check_output([llvm_config, '--version'])
      File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 420, in check_output
        return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
      File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 501, in run
        with Popen(*popenargs, **kwargs) as process:
      File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 947, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1819, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/private/var/folders/h7/4qbqnhgn263dd57tnng1d_tc0000gn/T/pip-install-3yilzwzn/llvmlite_99070c964ffb4ede8c0c7e306a22fc87/ffi/build.py", line 168, in <module>
        main()
      File "/private/var/folders/h7/4qbqnhgn263dd57tnng1d_tc0000gn/T/pip-install-3yilzwzn/llvmlite_99070c964ffb4ede8c0c7e306a22fc87/ffi/build.py", line 162, in main
        main_posix('osx', '.dylib')
      File "/private/var/folders/h7/4qbqnhgn263dd57tnng1d_tc0000gn/T/pip-install-3yilzwzn/llvmlite_99070c964ffb4ede8c0c7e306a22fc87/ffi/build.py", line 107, in main_posix
        raise RuntimeError("%s failed executing, please point LLVM_CONFIG "
    RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
    error: command '/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9' failed with exit code 1
    ----------------------------------------
  Rolling back uninstall of llvmlite
  Moving to /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/llvmlite-0.36.0.dist-info/
   from /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/~lvmlite-0.36.0.dist-info
  Moving to /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/llvmlite/
   from /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/~lvmlite
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/h7/4qbqnhgn263dd57tnng1d_tc0000gn/T/pip-install-3yilzwzn/llvmlite_99070c964ffb4ede8c0c7e306a22fc87/setup.py'"'"'; __file__='"'"'/private/var/folders/h7/4qbqnhgn263dd57tnng1d_tc0000gn/T/pip-install-3yilzwzn/llvmlite_99070c964ffb4ede8c0c7e306a22fc87/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/h7/4qbqnhgn263dd57tnng1d_tc0000gn/T/pip-record-vyl0ivcr/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/llvmlite Check the logs for full command output.
co9olguy commented 3 years ago

I notice from your pip freeze output that you've got quite a lot of packages installed in your python environment. I'm not surprised there are some clashes with such a big list :smile:

One suggestion would be to use anaconda or virtualenv to create a separate clean environment for, e.g., Strawberry Fields and its requirements there.

LorcanConlon commented 3 years ago

So I cleaned up what I have installed so that pip freeze returns

antlr4-python3-runtime==4.8
cachetools==4.2.1
certifi==2020.12.5
chardet==4.0.0
cirq==0.10.0
cloudpickle==1.6.0
cycler==0.10.0
dask==2021.4.0
decorator==4.4.2
fsspec==0.9.0
google-api-core==1.26.3
google-auth==1.28.0
googleapis-common-protos==1.53.0
grpcio==1.36.1
idna==2.10
kiwisolver==1.3.1
llvmlite==0.36.0
locket==0.2.1
matplotlib==3.4.1
mpmath==1.2.1
networkx==2.5.1
numba==0.53.1
numpy==1.20.2
packaging==20.9
pandas==1.2.3
partd==1.1.0
Pillow==8.2.0
protobuf==3.13.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pyparsing==2.4.7
python-dateutil==2.8.1
pytz==2021.1
PyYAML==5.4.1
repoze.lru==0.7
requests==2.25.1
rsa==4.7.2
scipy==1.6.2
six==1.15.0
sortedcontainers==2.3.0
sympy==1.7.1
toml==0.10.2
toolz==0.11.1
tqdm==4.60.0
typing-extensions==3.7.4.3
urllib3==1.26.4

However I now cannot even install strawberry fields. Attempting to install SF gives a very long error message. Do you know what dependencies SF has?

LorcanConlon commented 3 years ago

Hi so I fixed the issue, leaving this here in case anyone else has the same issue. The problem was that I couldn't install thewalrus with python 3.9. I think the two are incompatible. So I created a new virtual environment using python 3.7. This allows thewalrus to be installed which then allows strawberry fields to be installed.

Thanks for all the help!

josh146 commented 3 years ago

Glad to see that you got it working @LorcanConlon! Supporting Python 3.9 for The Walrus is a priority of ours, and we're working on having that available within the next few weeks