{"action":"created","issue":{"url":"https://api.github.com/repos/certbot/certbot/issues/3220","repository_url":"https://api.github.com/repos/certbot/certbot","labels_url":"https://api.github.com/repos/certbot/certbot/issues/3220/labels{/name}","comments_url":"https://api.github.com/repos/certbot/certbot/issues/3220/comments","events_url":"https://api.github.com/repos/certbot/certbot/issues/3220/events","html_url":"https://github.com/certbot/certbot/issues/3220","id":162661241,"number":3220,"title":"Creating Virtual Environment - \"No module named site\" on Ubuntu 14.04","user":{"login":"hanakemt","id":20185588,"avatar_url":"https://avatars.githubusercontent.com/u/20185588?v=3","gravatar_id":"","url":"https://api.github.com/users/hanakemt","html_url":"https://github.com/hanakemt","followers_url":"https://api.github.com/users/hanakemt/followers","following_url":"https://api.github.com/users/hanakemt/following{/other_user}","gists_url":"https://api.github.com/users/hanakemt/gists{/gist_id}","starred_url":"https://api.github.com/users/hanakemt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanakemt/subscriptions","organizations_url":"https://api.github.com/users/hanakemt/orgs","repos_url":"https://api.github.com/users/hanakemt/repos","events_url":"https://api.github.com/users/hanakemt/events{/privacy}","received_events_url":"https://api.github.com/users/hanakemt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/certbot/certbot/labels/certbot-auto","name":"certbot-auto","color":"00a080"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-06-28T11:16:10Z","updated_at":"2016-07-06T10:06:23Z","closed_at":null,"body":"When running certbot-auto for the first time on Ubuntu 14.04 the error  'Creating Virtual Environment - \"No module named site\"' stops the installation process. You should run certbot-auto as root (e.g. 'sudo certbot-auto') to be successful."},"comment":{"url":"https://api.github.com/repos/certbot/certbot/issues/comments/230731479","html_url":"https://github.com/certbot/certbot/issues/3220#issuecomment-230731479","issue_url":"https://api.github.com/repos/certbot/certbot/issues/3220","id":230731479,"user":{"login":"hanakemt","id":20185588,"avatar_url":"https://avatars.githubusercontent.com/u/20185588?v=3","gravatar_id":"","url":"https://api.github.com/users/hanakemt","html_url":"https://github.com/hanakemt","followers_url":"https://api.github.com/users/hanakemt/followers","following_url":"https://api.github.com/users/hanakemt/following{/other_user}","gists_url":"https://api.github.com/users/hanakemt/gists{/gist_id}","starred_url":"https://api.github.com/users/hanakemt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanakemt/subscriptions","organizations_url":"https://api.github.com/users/hanakemt/orgs","repos_url":"https://api.github.com/users/hanakemt/repos","events_url":"https://api.github.com/users/hanakemt/events{/privacy}","received_events_url":"https://api.github.com/users/hanakemt/received_events","type":"User","site_admin":false},"created_at":"2016-07-06T10:06:23Z","updated_at":"2016-07-06T10:06:23Z","body":"Thanks again for the suggestions. As virtualenv and PATH had produced the same output with and without 'sudo -u hanak', I uninstalled virtualenv by pip and purged python-virtualenv by aptitude (apt-get). Then I ran './certbot-auto --no-self-upgrade --verbose' that failed in the well-known error, and then 'sudo -u hanak ./certbot-auto --no-self-upgrade --verbose' that succeeded. I have noticed a slight difference at the end of the outputs. This was produced with 'sudo -u ...':\r\n\r\npython-virtualenv is already the newest version.\r\n0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.\r\nCreating virtual environment...\r\nRunning virtualenv with interpreter /usr/bin/python2.7\r\nNew python executable in /home/hanak/.local/share/letsencrypt/bin/python2.7\r\nAlso creating executable in /home/hanak/.local/share/letsencrypt/bin/python\r\nInstalling setuptools, pip...done.\r\nInstalling Python packages...\r\nInstallation succeeded.\r\n\r\nAnd this without 'sudo -u ...':\r\n\r\npython-virtualenv is already the newest version.\r\n0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.\r\nCreating virtual environment...\r\nRunning virtualenv with interpreter /usr/bin/python2.7\r\nNew python executable in :/usr/local/monodevelop-3.0.3.5/share/letsencrypt/bin/python2.7\r\nAlso creating executable in :/usr/local/monodevelop-3.0.3.5/share/letsencrypt/bin/python\r\nImportError: No module named site\r\nERROR: The executable :/usr/local/monodevelop-3.0.3.5/share/letsencrypt/bin/python2.7 is not functioning\r\nERROR: It thinks sys.prefix is u'/home/hanak/net/letsencrypt/bin' (should be u'/home/hanak/net/letsencrypt/bin/:/usr/local/monodevelop-3.0.3.5/share/letsencrypt')\r\nERROR: virtualenv is not compatible with this system or executable\r\n\r\nSo it seems to me that with 'sudo -u ...' it creates the ~/.local/share/letsencrypt/ folder while without it it creates the letsencrypt folder in <current_folder>/:/usr/local/monodevelop-3.0.3.5/share/, with incorrect content (I compared the two folders).\r\n\r\nPurging mono-devel, mono-runtime and related packages did not help.\r\n\r\nThen I copied the missing folders and files from ~/.local/share/letsencrypt/ to '<current_folder>/:/usr/local/monodevelop-3.0.3.5/share/letsencrypt/, and cert-autobot started to work!\r\n\r\nSo, now the question is this: why is the folder letsencyrpt created in the folder ':/usr/local/monodevelop...\" wihtout sudo instead of the folder '~/.local/share/'? \r\n\r\n"}}
{"actor":{"display_login":"hanakemt"}}