Home › Forums › FABRIC General Questions and Discussion › Error occured while installing fabric python API
Tagged: bdist_wheel, python-api, typed-ast error
- This topic has 8 replies, 4 voices, and was last updated 2 years, 3 months ago by ADAM GRIFFITH.
-
AuthorPosts
-
September 7, 2022 at 10:25 pm #2900
Hello, I am trying to install python API from this tutorial https://learn.fabric-testbed.net/knowledge-base/install-the-python-api/ . While doing it, I encountered the following error.
Building wheel for typed-ast (setup.py) ... error error: subprocess-exited-with-error python setup.py bdist_wheel did not run successfully. running install /users/manasdas/anaconda3/envs/my_env/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py creating build creating build/lib.linux-x86_64-cpython-310 creating build/lib.linux-x86_64-cpython-310/typed_ast copying typed_ast/__init__.py -> build/lib.linux-x86_64-cpython-310/typed_ast copying typed_ast/ast3.py -> build/lib.linux-x86_64-cpython-310/typed_ast copying typed_ast/ast27.py -> build/lib.linux-x86_64-cpython-310/typed_ast copying typed_ast/conversions.py -> build/lib.linux-x86_64-cpython-310/typed_ast creating build/lib.linux-x86_64-cpython-310/typed_ast/tests copying ast3/tests/test_basics.py -> build/lib.linux-x86_64-cpython-310/typed_ast/tests running build_ext building '_ast27' extension creating build/temp.linux-x86_64-cpython-310 creating build/temp.linux-x86_64-cpython-310/ast27 creating build/temp.linux-x86_64-cpython-310/ast27/Custom creating build/temp.linux-x86_64-cpython-310/ast27/Parser creating build/temp.linux-x86_64-cpython-310/ast27/Python gcc -pthread -B /users/manasdas/anaconda3/envs/my_env/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -fPIC -O2 -isystem /users/manasdas/anaconda3/envs/my_env/include -fPIC -O2 -isystem /users/manasdas/anaconda3/envs/my_env/include -fPIC -Iast27/Include -I/users/manasdas/anaconda3/envs/my_env/include/python3.10 -c ast27/Custom/typed_ast.c -o build/temp.linux-x86_64-cpython-310/ast27/Custom/typed_ast.o ...... ..... error: command '/usr/bin/gcc' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure × Encountered error while trying to install package. ╰─> typed-ast
I tried both conda environment and virtualenv, I am getting the same error.
Anyone know how to solve it? Please let me know.
Thank you
- This topic was modified 2 years, 3 months ago by Manas Das.
September 7, 2022 at 10:42 pm #2902If you are looking to interact with Fabric via Python I have had a lot of success with the FABLib API.
Here is our Conda
environment.yml
file:# conda env create --file environment.yml name: uofu-fabrictestbed channels: - defaults dependencies: - pip=21.2.4 - python=3.9.12 - pip: - fabrictestbed-extensions==1.3.0
September 7, 2022 at 11:01 pm #2903@Adam Thank you for your reply, I am working with a headless machine so notebooks are of no use to me. So please let me know how to install fabric-testbed on a headless machine. I am trying to install it for many hours now, but still getting the same above mentioned error.
September 7, 2022 at 11:32 pm #2904@ Adam I will use the configuration file and try to create a slice. If you know how to do it in a headless machine it will be great, Thanks.
- This reply was modified 2 years, 3 months ago by Manas Das.
September 8, 2022 at 12:33 am #2906My advice would be to start with copying the FABLib commands documented on the
start_here.ipynb --> create_slice.ipynb
Jupyter Lab notebook to your local Python script file.If you would like, feel free to cannibalize my very rough Python code on GitHub.
September 8, 2022 at 6:07 am #2907@Manas I would strongly encourage you to avoid the native API and, instead, use FABlib. FABlib does not require Jupyter Notebooks and can be used on its own.
You should be able to install it with
pip
using the following command:python3 -m pip install fabrictestbed-extensions
You will need Python 3.9.
Adam’s config for Anaconda likely works too.
- This reply was modified 2 years, 3 months ago by Paul Ruth.
September 8, 2022 at 10:10 am #2916@Adam thank you for your help. I will keep in mind your advice.
@Paul, you are correct, I will use fabrictestbed-extensions and hope everything works out.
September 8, 2022 at 6:02 pm #2938@Adam, I’m also working on build Fablib API on my University Cluster. It doesn’t support a browse, so I have to do it with python scripts. I followed the steps on the github you sent. However, I met an error that
AttributeError: module 'cluster' has no attribute 'logger'
. I was wondering if it was because of the version of cluster.September 9, 2022 at 9:35 am #2941@Xusheng, the rough Python code is tailored to work with my IntelliJ IDE. However it does contain good examples of what environmental variables FABLib expects, how to call functions in FABLib, etc.. In short, I would write your own Python by grabbing the useful bits from mine.
-
AuthorPosts
- You must be logged in to reply to this topic.