asdf-community / asdf-python

Python plugin for the asdf version manager
https://github.com/asdf-vm/asdf
MIT License
656 stars 56 forks source link

After installing Python with asdf I have a diferent version of cURL installed and running #53

Closed rogeliozarate closed 5 years ago

rogeliozarate commented 5 years ago

I am not sure if this is Python, asdf or Emacs related but I have to start somewhere.

whereis curl
curl: /usr/bin/curl /home/cobi/.asdf/shims/curl /home/linuxbrew/.linuxbrew/bin/curl /usr/share/man/man1/curl.1.gz

Running Ubuntu 18.04.02 64 bits I had a version of cURL installed:

/usr/bin/curl --version
curl 7.58.0 (x86_64-pc-linux-gnu) libcurl/7.58.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Release-Date: 2018-01-24
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL

This particular version did not work well with Emacs and there was some issues about certificates, so I installed with HOMEBREW a different version:

/home/linuxbrew/.linuxbrew/bin/curl --version
curl 7.63.0 (x86_64-pc-linux-gnu) libcurl/7.63.0 OpenSSL/1.0.2q
Release-Date: 2018-12-12
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL TLS-SRP UnixSockets HTTPS-proxy 

After installing Python with asdf, I got this version working:

asdf list
python
  3.7.0
  anaconda3-5.3.1
/home/cobi/.asdf/shims/curl --version
curl 7.61.0 (x86_64-conda_cos6-linux-gnu) libcurl/7.61.0 OpenSSL/1.0.2p zlib/1.2.11
Release-Date: 2018-07-11
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy 

Emacs uses cURL for several tasks inside some packages installed, like twittering-mode, to twit inside Emacs. I do not know why Python 3.7.0 takes over the system installed cURL. So far this particular version works ok in BASH CLI

danhper commented 5 years ago

What package is installing curl into shims? Could you try asdf which curl please? I would rather stick with the system curl unless you have a good reason not to.

rogeliozarate commented 5 years ago

Current global Python is 3.7.0, but the "conda" text in --version makes me think that the shim was installed by python-anaconda3-5.3.1.

$asdf which curl
No such plugin: curl

I agree with sticking to system cURL.

danhper commented 5 years ago

What version of asdf are you using? This seems to be a fairly old error message. Could you try with the latest version please? Thanks!

rogeliozarate commented 5 years ago

Updated asdf to release v0.7.1

asdf which curl
/home/cobi/.asdf/installs/python/anaconda3-5.3.1/bin/curl
danhper commented 5 years ago

Ok, so the behavior seems perfectly normal but it is rather an incompatibility between the version of curl (or SSL certificates) provided by anaconda and emacs. I am not sure if there is something I can do on my side to help for this. I would simply recommend to uninstall curl installed by anaconda and stick with the system version.

rogeliozarate commented 5 years ago

I agree with you. It is surprising to me that a language version install his own cURL version. Thanks for the help and the insights.

danhper commented 5 years ago

I think anaconda bundles up quite a few libraries which are usually provided by system packages to avoid version incompatibilities. I suppose it is possible to choose which libraries/executable anaconda should install but you should probably check anaconda documentation for that.

rogeliozarate commented 5 years ago

As a corollary, if someone gets here with a similar issue: