New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workaround distutils bug #113
Comments
Do you mean this one? I just updated packages and can't use emacs because of it. |
Yes, I mean exactly this problem. |
You can find temporary workaround in #114 |
Already fixed, thank you. |
@proofit404 is there any chance you've made progress on this? I appreciate that this is OSS, so no demands, but if you happen to have the time I'd love to see a fix trickle out. Thank you. |
There are a lot of work to do on this project to make it pleasant for every one. Unfortunately I doesn't have enough time to work on each issue. Currently make Thanks for your patience. |
I encountered the same problem with the latest debian sid. The pip version is 8.1.1. There is no shipped distutils.cfg. I ended up removing debian's python-pip package and uses the get-pip script to get an upstream version of pip. That one also is of version 8.1.1. |
System wide pip installation doesn't work and pip installed with get-pip script works without any different change in the system? |
System wide pip installation doesn't work pip installed with get-pip script works without any different change in the system? |
What Linux distribution (with full version) do you use? I will try to reproduce this in virtual machine. |
debian sid 64bit. |
What installation method did you use? netinstall/desktop with ui installer |
I think it doesn't matter here, though. I installed the latest Debian sid with virtualbox. The installation is done in expert-mode, and no X software is installed. So all happens within tui. If you open up a Debian 64bit testing instance on google cloud platform, you will suffer the same issue. |
Maybe we can get rid of this bug finally. I need help from person with OS X. Given: python (2.7 for example) installed with homebrew. Code below must fail with weird distutils error. mkdir $HOME/.emacs.d/anaconda-mode/test/
pip install -t $HOME/.emacs.d/anaconda-mode/test/ anaconda-mode At the same time some thing like this may works: PYTHONPATH=$HOME/.emacs.d/anaconda-mode/test/ easy_install -d $HOME/.emacs.d/anaconda-mode/test/ -a anaconda_mode Any volunteer to help? |
I confirm (OS X 10.11.5) that the first results in error and the latter installs without any problems. With python from homebrew. |
@ttylec Thanks for your help! |
@proofit404 Just want you know. maybe helpful. Debian Test has same bug;
ERROR: Can not combine '--user' and '--prefix' as they imply different installation locations
|
And why not create a virtualenv for anaconda server but Install using the system scheme ; just like jedi.el . |
@sickHamm Thanks for information you provide. The reason to install anaconda_mode python package into directory and not in virtual environment is pretty straightforward. Last time I saw jedi.el the way it works with your own virtual environments was ugly. I don't know if it changes. If I recall correctly you need add side packages from your own virtual environment as a buffer local variable to run separate jedirpcserver for each buffer. There is a special package to simplify this. I don't like this approach at all. Anaconda mode make it difference. All that you need is activate your project virtual environment as you usually does with python.el (set global variable ones). Anaconda mode takes care of the rest of process including installation and server monitoring. The simplest way to implement this just have a directory where anaconda_mode.py and its dependencies lives. Hope this clarify taken design decisions a little. Regards, Artem. |
thanks for your explanation. and my explanation maybe not very clear;
|
At this point we decide to move from pip to easy_install. It achieve same goal without flags conflict. You can follow related discussion in #186 |
Pip is a wonderful utility, yet hopelessly not friendly to scripts. Its deficiencies could be easily described as bugs, and then we could insist on upstream fixing them. Until then, installation procedure would remain broken in a number of configurations. Afterwards, users would need to pay attention to use sufficiently new PIP. The problems are at least the following: - If PIP is installed with prefix option set in distutils.cfg, e.g., the way homebrew does it on mac, command line option -t will not override it, but instead a configuration conflict will be reported. - Debian-based distributions patch PIP to default to using --user installation scheme, if not run within a virtualenv, and provide debian-specific --system option to override this behaviour. The default, yet again, conflicts with -t option, instead of being overridden by the latter. By comparison, easy_install does not suffer from either of those. This commit replaces installation using pip with easy_install. As a result, the packages are installed as eggs, which means that server setup launch procedure had to be replaced with a python script as well. Additionally, since eggs are not accessible through their parent directory and need to be added to sys.path separately, the server detection command also needed to be altered, so that instead of just checking the installation directory, it would check immediate subdirectories. anaconda_mode present in one of the subdirectories would not guarantee that it works, so it then also tries to find that path in sys.path. This change is entirely backward compatible: - The check-installation-command will correctly detect legacy installation made by pip. - the server-command will successfully run such installation. Hence the the needed version of anaconda_mode python package has not yet been modified, to allow for separate deployment and easier testing. It is also worth noting that site.addsitedir() ends up adding eggs before system site packages, so that the locally installed version of python package will take precedence over any global installation. The same applies to legacy installation in pip-style: while the absolute path version of current directory will be added to the end of sys.path, the current directory pattern remains in front of system directory, so that anaconda_mode will be imported from the current directory. This should fix pythonic-emacs#113 and pythonic-emacs#114.
Ignore distutils prefix config parameter during package installations.
The text was updated successfully, but these errors were encountered: