ValueError: virtualenv: cannot access lib: No such virtualenv or

I am taking the AppEngine Deep dive course and while trying to deploy LA Music Gallery app to Google Cloud, I am getting the below error. Can somebody advise what needs to be done to resolve this?(PS: I am trying to deploy from one of the CloudServers (CentOs7) in LinuxAcademy to Google Cloud)

ValueError: virtualenv: cannot access lib: No such virtualenv or site directory

at add (/base/alloc/tmpfs/dynamic_runtimes/python27g/3b44e98ed7fbb86b/python27/python27_lib/versions/1/google/appengine/ext/vendor/__init__.py:44)

at <module> (/base/data/home/apps/p~la-music-gallery-221814/20181107t172802.413823258125543397/appengine_config.py:13)

at import_module (/base/alloc/tmpfs/dynamic_runtimes/python27g/3b44e98ed7fbb86b/python27/python27_dist/lib/python2.7/importlib/__init__.py:37)

at initialize (/base/alloc/tmpfs/dynamic_runtimes/python27g/3b44e98ed7fbb86b/python27/python27_lib/versions/1/google/appengine/api/lib_config.py:165)

at _update_configs (/base/alloc/tmpfs/dynamic_runtimes/python27g/3b44e98ed7fbb86b/python27/python27_lib/versions/1/google/appengine/api/lib_config.py:294)

at __getattr__ (/base/alloc/tmpfs/dynamic_runtimes/python27g/3b44e98ed7fbb86b/python27/python27_lib/versions/1/google/appengine/api/lib_config.py:358)

at Handle (/base/alloc/tmpfs/dynamic_runtimes/python27g/3b44e98ed7fbb86b/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py:240)



  • post-author-pic
    Joseph L
    11-08-2018

    Hi Shashank - Looks like the deployment is not able to load virtualenv. Did you follow the steps outlined in the "Focusing on Python" lessons (there's one for each OS)? If you did and are still getting this error, let me know - either here or directly at joseph@linuxacademy.com - and I'll work with you to get the app up and running.

  • post-author-pic
    Sandra V
    11-19-2018

    had the same issue, this was missing ( 

    https://cloud.google.com/appengine/docs/standard/python/tools/using-libraries-python-27#vendoring ).

    In project directory:

    1) mkdir lib

    2)  pip install -t lib -r requirements.txt

    As I understand for third party libraries

Looking For Team Training?

Learn More