facebookresearch / torchbeast

A PyTorch Platform for Distributed RL
Apache License 2.0
734 stars 113 forks source link

Error installing nest on Mac #22

Closed rockt closed 2 years ago

rockt commented 3 years ago

On my Mac OS 10.15.7 (19H15)

$ conda create -n test python=3.8
$ conda activate test
$ pip install -r requirements.txt
$ brew install grpc
$ pip install nest/                                                                                                                                                                                                                                                           
Processing ./nest
Collecting pybind11>=2.3
  Using cached pybind11-2.6.2-py2.py3-none-any.whl (191 kB)
Building wheels for collected packages: nest
  Building wheel for nest (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/rockt/anaconda3/envs/test/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/l4/dvygh6ns3cx1mmtmpjsrbcdhcjqgsy/T/pip-req-build-m0nc80nn/setup.py'"'"'; __file__='"'"'/private/var/folders/l4/dvygh6ns3cx1mmtmpjsrbcdhcjqgsy/T/pip-req-build-m0nc80nn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/l4/dvygh6ns3cx1mmtmpjsrbcdhcjqgsy/T/pip-wheel-fdslgohg
       cwd: /private/var/folders/l4/dvygh6ns3cx1mmtmpjsrbcdhcjqgsy/T/pip-req-build-m0nc80nn/
  Complete output (14 lines):
  running bdist_wheel
  running build
  running build_ext
  building 'nest' extension
  creating build
  creating build/temp.macosx-10.9-x86_64-3.8
  creating build/temp.macosx-10.9-x86_64-3.8/nest
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/rockt/anaconda3/envs/test/include -arch x86_64 -I/Users/rockt/anaconda3/envs/test/include -arch x86_64 -I/private/var/folders/l4/dvygh6ns3cx1mmtmpjsrbcdhcjqgsy/T/pip-req-build-m0nc80nn/.eggs/pybind11-2.6.2-py3.8.egg/pybind11/include -I/private/var/folders/l4/dvygh6ns3cx1mmtmpjsrbcdhcjqgsy/T/pip-req-build-m0nc80nn/.eggs/pybind11-2.6.2-py3.8.egg/pybind11/include -I/Users/rockt/anaconda3/envs/test/include/python3.8 -c nest/nest_pybind.cc -o build/temp.macosx-10.9-x86_64-3.8/nest/nest_pybind.o -std=c++17 -stdlib=libc++ -mmacosx-version-min=10.14 -DVERSION_INFO="0.0.3" -std=c++17 -fvisibility=hidden
  creating build/lib.macosx-10.9-x86_64-3.8
  g++ -bundle -undefined dynamic_lookup -L/Users/rockt/anaconda3/envs/test/lib -arch x86_64 -L/Users/rockt/anaconda3/envs/test/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.9-x86_64-3.8/nest/nest_pybind.o -o build/lib.macosx-10.9-x86_64-3.8/nest.cpython-38-darwin.so -stdlib=libc++
  ld: warning: object file (build/temp.macosx-10.9-x86_64-3.8/nest/nest_pybind.o) was built for newer OSX version (10.14) than being linked (10.9)
  ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/libSystem.tbd' for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  error: command 'g++' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for nest
  Running setup.py clean for nest
Failed to build nest
cyou6 commented 3 years ago

Do you find the solution finally?

heiner commented 2 years ago

This was fixed by removing old compilation outputs.