{"action":"opened","issue":{"url":"https://api.github.com/repos/lektor/lektor/issues/113","labels_url":"https://api.github.com/repos/lektor/lektor/issues/113/labels{/name}","comments_url":"https://api.github.com/repos/lektor/lektor/issues/113/comments","events_url":"https://api.github.com/repos/lektor/lektor/issues/113/events","html_url":"https://github.com/lektor/lektor/issues/113","id":127069694,"number":113,"title":"Using lektor installed with pip fails.","user":{"login":"GrahamDumpleton","id":507637,"avatar_url":"https://avatars.githubusercontent.com/u/507637?v=3","gravatar_id":"","url":"https://api.github.com/users/GrahamDumpleton","html_url":"https://github.com/GrahamDumpleton","followers_url":"https://api.github.com/users/GrahamDumpleton/followers","following_url":"https://api.github.com/users/GrahamDumpleton/following{/other_user}","gists_url":"https://api.github.com/users/GrahamDumpleton/gists{/gist_id}","starred_url":"https://api.github.com/users/GrahamDumpleton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrahamDumpleton/subscriptions","organizations_url":"https://api.github.com/users/GrahamDumpleton/orgs","repos_url":"https://api.github.com/users/GrahamDumpleton/repos","events_url":"https://api.github.com/users/GrahamDumpleton/events{/privacy}","received_events_url":"https://api.github.com/users/GrahamDumpleton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-17T02:24:12Z","updated_at":"2016-01-17T02:24:12Z","closed_at":null,"body":"I know your web site says:\r\n\r\n**When we say this installation type is discouraged we mean it. The reason is that it encourages uses of Lektor which are entirely unsupported by us. Lektor actively manages virtualenvs for plugin installations in very specific ways and this might or might not work in your setup. We support pip installations for deployment environments and local development only.**\r\n\r\nbut I am trying to use Lektor in what is a deployment environment of sorts, which you sort of do say you will support.\r\n\r\nThe problem is that I use:\r\n\r\n```\r\npip install Lektor\r\n```\r\n\r\nand then later:\r\n\r\n```\r\nlektor build --output-path /data\r\n```\r\n\r\nin the directory of the project, then it eventually fails with the output:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/usr/local/python/bin/lektor\", line 11, in <module>\r\n    sys.exit(main())\r\n  File \"/usr/local/python/lib/python2.7/site-packages/click/core.py\", line 716, in __call__\r\n    return self.main(*args, **kwargs)\r\n  File \"/usr/local/python/lib/python2.7/site-packages/click/core.py\", line 696, in main\r\n    rv = self.invoke(ctx)\r\n  File \"/usr/local/python/lib/python2.7/site-packages/click/core.py\", line 1060, in invoke\r\n    return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n  File \"/usr/local/python/lib/python2.7/site-packages/click/core.py\", line 889, in invoke\r\n    return ctx.invoke(self.callback, **ctx.params)\r\n  File \"/usr/local/python/lib/python2.7/site-packages/click/core.py\", line 534, in invoke\r\n    return callback(*args, **kwargs)\r\n  File \"/usr/local/python/lib/python2.7/site-packages/click/decorators.py\", line 64, in new_func\r\n    return ctx.invoke(f, obj, *args[1:], **kwargs)\r\n  File \"/usr/local/python/lib/python2.7/site-packages/click/core.py\", line 534, in invoke\r\n    return callback(*args, **kwargs)\r\n  File \"/usr/local/python/lib/python2.7/site-packages/lektor/cli.py\", line 159, in build_cmd\r\n    ctx.load_plugins()\r\n  File \"/usr/local/python/lib/python2.7/site-packages/lektor/cli.py\", line 84, in load_plugins\r\n    initialize_plugins(self.get_env())\r\n  File \"/usr/local/python/lib/python2.7/site-packages/lektor/pluginsystem.py\", line 121, in initialize_plugins\r\n    plugins = load_plugins()\r\n  File \"/usr/local/python/lib/python2.7/site-packages/lektor/pluginsystem.py\", line 115, in load_plugins\r\n    rv[ep.name] = ep.load()\r\n  File \"/usr/local/python/lib/python2.7/site-packages/pkg_resources/__init__.py\", line 2380, in load\r\n    return self.resolve()\r\n  File \"/usr/local/python/lib/python2.7/site-packages/pkg_resources/__init__.py\", line 2386, in resolve\r\n    module = __import__(self.module_name, fromlist=['__name__'], level=0)\r\n  File \"/home/whiskey/.cache/lektor/packages/4a18bd5447c737ad6b5ff8baf4acafe6/lektor_atom.py\", line 14, in <module>\r\n    from lektor.utils import build_url\r\nImportError: cannot import name build_url\r\n```\r\n\r\nThe problem is that the build phase is triggering some update which is pulling down code which is dependent on unreleased code in Lektor. IOW, ``lektor.utils.build_url()`` doesn't exist in Lektor 1.1.\r\n\r\n```\r\n$ pip freeze\r\nargh==0.26.1\r\nBabel==2.2.0\r\ncffi==1.5.0\r\nclick==6.2\r\ncryptography==1.2.1\r\nenum34==1.1.2\r\nExifRead==2.1.2\r\nFlask==0.10.1\r\nidna==2.0\r\ninifile==0.3\r\nipaddress==1.0.16\r\nitsdangerous==0.24\r\nJinja2==2.8\r\nLektor==1.1\r\nMarkupSafe==0.23\r\nmistune==0.7.1\r\nmod-wsgi==4.4.21\r\nndg-httpsclient==0.4.0\r\npathtools==0.1.2\r\npyasn1==0.1.9\r\npycparser==2.14\r\npyOpenSSL==0.15.1\r\npytz==2015.7\r\nPyYAML==3.11\r\nrequests==2.9.1\r\nsix==1.10.0\r\nwatchdog==0.8.3\r\nWerkzeug==0.11.3\r\nwheel==0.26.0\r\n```\r\n\r\nI have tried to use:\r\n\r\n```\r\ncurl -sf https://www.getlektor.com/install.sh | sh\r\n```\r\n\r\nbut that also fails in my case as I am running it the ``Dockerfile`` for a Docker build and this script will blow up because it is trying to open ``/dev/tty`` which will not exist in a Docker container when being built.\r\n\r\n```\r\nStep 2 : RUN curl -sf https://www.getlektor.com/install.sh | sh\r\n ---> Running in d135cae830fc\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 11, in <module>\r\nIOError: [Errno 6] No such device or address: '/dev/tty'\r\nThe command '/bin/sh -c curl -sf https://www.getlektor.com/install.sh | sh' returned a non-zero code: 1\r\n```\r\n\r\nSuggestions on how to install Lektor as part of a Docker build so it will work?\r\n\r\n\r\n\r\n"}}