In the deployment process, use the virtual environment, but start the program when the error, as follows:
Traceback (most recent):
File "/home/himalayas/fdsearch/fdsearch/bin/fdsearch", line-in <module>
From Fdsearch import Wsgi
File "/home/himalayas/fdsearch/fdsearch/wsgi.py", line +, in <module>
Import Fdsearch.domain
File "/home/himalayas/fdsearch/fdsearch/domain/__init__.py", line A, in <module>
From Notify_handler import NotifyHandler
File "/home/himalayas/fdsearch/fdsearch/domain/notify_handler.py", line at <module>
From Cjson import encode as Json_encode
File "build/bdist.linux-x86_64/egg/cjson.py", line 7, <module>
File "build/bdist.linux-x86_64/egg/cjson.py", line 4, in __bootstrap__
File "/home/himalayas/virtualenv/python2.7-fd/lib/python2.7/site-packages/pkg_resources.py", line 945, in Resource_ FileName
Self, resource_name
File "/home/himalayas/virtualenv/python2.7-fd/lib/python2.7/site-packages/pkg_resources.py", line 1633, in get_ Resource_filename
Self._extract_resource (Manager, Self._eager_to_zip (name))
File "/home/himalayas/virtualenv/python2.7-fd/lib/python2.7/site-packages/pkg_resources.py", line 1661, in _extract _resource
Self.egg_name, Self._parts (Zip_path)
File "/home/himalayas/virtualenv/python2.7-fd/lib/python2.7/site-packages/pkg_resources.py", line 1025, in get_ Cache_path
Self.extraction_error ()
File "/home/himalayas/virtualenv/python2.7-fd/lib/python2.7/site-packages/pkg_resources.py", line 991, in Extraction_error
Raise Err
Pkg_resources. Extractionerror:can ' t extract file (s) to egg cache
The following error occurred while trying to extract file (s) to the Python egg
Cache
[Errno 13] Permission denied: '/root/.python-eggs '
The Python Egg cache directory is currently set to:
/root/.python-eggs
WORKAROUND: Let the development declare the environment variables in the code.
Export Python_egg_cache=/some/other/dir
Note: There is no way to declare in the/etc/profile of the system, because the program is running in a virtual environment.
/root/.python-eggs Error