cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Bookmark
|
Subscribe
|
1757
Views
5
Helpful
1
Replies

pip install flask-bootstrap errored out with exit status 1

Following Pull Down Sample Code and Prep Python Environment section under 'How To Setup Your Own Computer' @
https://developer.cisco.com/learning/modules/intro-to-aci/sbx-intro-aci-02_programmability-options/step/2:

pip install -r requirements.txt (pip install -r ./acitoolkit/requirements.txt #the way the step should be)

the installation got errored out with status 1 for flask-bootstrap

(venv) [qaswar@localhost aci_ansible_learning_labs_code_samples]$ pip install -r ./acitoolkit/requirements.txt
Collecting requests (from -r ./acitoolkit/requirements.txt (line 4))
  Downloading https://files.pythonhosted.org/packages/1a/70/1935c770cb3be6e3a8b78ced23d7e0f3b187f5cbfab4749523ed65d7c9b1/requests-2.23.0-py2.py3-none-any.whl (58kB)
     |████████████████████████████████| 61kB 355kB/s
Collecting websocket-client>0.33.0 (from -r ./acitoolkit/requirements.txt (line 5))
  Downloading https://files.pythonhosted.org/packages/4c/5f/f61b420143ed1c8dc69f9eaec5ff1ac36109d52c80de49d66e0c36c3dfdf/websocket_client-0.57.0-py2.py3-none-any.whl (200kB)
     |████████████████████████████████| 204kB 771kB/s
Collecting gitpython (from -r ./acitoolkit/requirements.txt (line 6))
  Downloading https://files.pythonhosted.org/packages/d3/2f/6a366d56c9b1355b0880be9ea66b166cb3536392638d8d91413ec66305ad/GitPython-3.1.0-py3-none-any.whl (450kB)
     |████████████████████████████████| 460kB 1.2MB/s
Collecting flask-httpauth (from -r ./acitoolkit/requirements.txt (line 7))
  Downloading https://files.pythonhosted.org/packages/b9/fd/89fc9aa163b5a7aa809fac0835502c2b66f48a5114a73df7e2a104cc645f/Flask_HTTPAuth-3.3.0-py2.py3-none-any.whl
Collecting flask-sqlalchemy (from -r ./acitoolkit/requirements.txt (line 8))
  Downloading https://files.pythonhosted.org/packages/1e/65/226d95466c75e34e291a76890ed0e27af2e46ab913002847856f11d4d59d/Flask_SQLAlchemy-2.4.1-py2.py3-none-any.whl
Collecting flask-admin (from -r ./acitoolkit/requirements.txt (line 9))
  Downloading https://files.pythonhosted.org/packages/be/4c/540ea85163e5b004e4018640bc21ffde34732ae14b0d0ae63b66733b764a/Flask_Admin-1.5.5-py3-none-any.whl (1.9MB)
     |████████████████████████████████| 1.9MB 1.8MB/s
Collecting flask-bootstrap (from -r ./acitoolkit/requirements.txt (line 10))
  Downloading https://files.pythonhosted.org/packages/88/53/958ce7c2aa26280b7fd7f3eecbf13053f1302ee2acb1db58ef32e1c23c2a/Flask-Bootstrap-3.3.7.1.tar.gz (456kB)
     |████████████████████████████████| 460kB 1.7MB/s
    ERROR: Command errored out with exit status 1:
     command: /home/qaswar/aci_ansible_learning_labs_code_samples/venv/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-52166d4h/flask-bootstrap/setup.py'"'"'; __file__='"'"'/tmp/pip-install-52166d4h/flask-bootstrap/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: /tmp/pip-install-52166d4h/flask-bootstrap/
    Complete output (11 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/qaswar/aci_ansible_learning_labs_code_samples/venv/lib/python3.7/site-packages/setuptools/__init__.py", line 20, in <module>
        from setuptools.dist import Distribution, Feature
      File "/home/qaswar/aci_ansible_learning_labs_code_samples/venv/lib/python3.7/site-packages/setuptools/dist.py", line 35, in <module>
        from setuptools import windows_support
      File "/home/qaswar/aci_ansible_learning_labs_code_samples/venv/lib/python3.7/site-packages/setuptools/windows_support.py", line 2, in <module>
        import ctypes
      File "/usr/local/lib/python3.7/ctypes/__init__.py", line 7, in <module>
        from _ctypes import Union, Structure, Array
    ModuleNotFoundError: No module named '_ctypes'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

 

1 Reply 1

Claudia de Luna
Spotlight

Hi @QaswarHussain9318 ,

 

Try the highest rated answer in this StackOverflow post and see if that resolves the issue:


it’s failing on _ctypes module import

https://stackoverflow.com/questions/27022373/python3-importerror-no-module-named-ctypes-when-using-value-from-module-mul

 

Review Cisco Networking for a $25 gift card

Save 25% on Day-2 Operations Add-On License