asdf-community / asdf-python Goto Github PK
View Code? Open in Web Editor NEWPython plugin for the asdf version manager
Home Page: https://github.com/asdf-vm/asdf
License: MIT License
Python plugin for the asdf version manager
Home Page: https://github.com/asdf-vm/asdf
License: MIT License
I'm left in the dark, I need to run pip with asdf because the discord.py rewrite requires python >=3.5.3 and ubuntu's version is literally 3.5.2. i've run asdf install python 3.6.8 and asdf local python 3.6.8 and even asdf global python 3.6.8 and I don't know what to do.
https://github.com/pyenv/pyenv/blob/master/pyenv.d/rehash/conda.d/default.list
instaling anaconda via asdf python kind of breaks the shell right now. I have to delete these shims manually as I run into issues
I'd be happy to help make this happen if you're amenable. thanks
For some reason, even after a module is installed (pygresql
) via pip, its failing to load:
import csv
import pygresql
% python test.py
Traceback (most recent call last):
File "test.py", line 2, in <module>
import pygresql
% which python
/Users/xxx/.asdf/shims/python
% pip install pygresql
Requirement already satisfied: pygresql in /Users/xx/.asdf/installs/python/3.7.3/lib/python3.7/site-packages (5.1)
I am trying to install flask. It itself installs fine when running pip install flask
, but I cannot figure out how to run the binary that it is supposed to install as well (The FLASK_APP=hello.py flask run
command does not work, because the flask
binary cannot be found).
Where does asdf-python install the binaries to? Do I need to add some directory to my PATH?
Because of problems below, build fall into error.
Maybe this is difficult to solve now so, I write a current solution.
I hope this post will help you faced similar problems.
sudo pacman -S gcc7
export CC=/usr/bin/gcc-7
export CXX=/usr/bin/g++-7
export CFLAGS=-I/usr/include/tirpc
asdf install python 2.7.13
There gotta to be something pretty basic I am missing.
I have multiple virtual environments for multiple projects, I use this to isolate dependencies between the various projects.
Here I have a ".tools-version" that is different from the "global" python version:
HSCode/ › python --version
Python 3.7.2
HSCode/ › cd test
test/ › python --version
Python 2.7.14
Based on that I want to create a new virtualenev that will work with the local python version, however:
test/ › mkvirtualenv -p $(which python) test_venv
Running virtualenv with interpreter /Users/$$$/.asdf/shims/python
Using base prefix '/Users/$$$/.asdf/installs/python/3.7.2'
New python executable in /Users/$$$/.virtualenvs/test_venv/bin/python
Installing setuptools, pip, wheel...done.
(test_venv) test/ › python --version
Python 3.7.2
Any ideas or pointers regarding the workflow for virtual environments + asdf-python ?
Currently, when using asdf-python, if you have configured the version of Python to be 3.x.x in some directory, the command python2
will return:
No such command in 3.x.x of python
Whereas when you configure it to use python 2.x.x, it will return, when calling python3
:
No such command in 2.x.x of python
I have come across problems were a build script attempted to find out if python 2 or python 3 was installed. (they use which python2
to see if we use Python 2, which succeeds as this returns /home/yourusername/.asdf/shims/python2
. But then actually calling this binary will fail with above error.)
I think it would be better behaviour if the ASDF wrapper for these binaries would:
python2
resp. python3
.Hey guys,
I use ASDF for a lot of different langs, but in python anytime I install a new package via pip
or pip3
I need to run asdf reshim python
to get it to load correctly.
Is this intended behaviour? In other langs, e.g., JS, Elixir, Ruby, you don't need to do this.
Thanks!
Is there a way to use pyenv virtualenv
with asdf-python
?
I don't pollute the global Python environment with my packages. So, I create a virtualenv using pyenv virtualenv
:
$ pyenv virtualenv 3.7.6 jupyter
$ pyenv activate jupyter
(jupyter) $ pip install jupyter matplotlib pandas scipy
(jupyter) $ pyenv deactivate
$ pyenv global 3.7.6 jupyter
Is there a way to achieve that with asdf-python
?
Thanks in advance.
Hi, my problem is the following, I'm using tox with the following python versions 2.7, 3.5 and 3.6.
I have currently set python 3.5 as local in my project, when I launch the tox
command it tries to create a virtualenv for each version, it successfully creates the one for 2.7 and 3.5, but when it tries to create the one for 3.6 it fails.
ERROR: py36: Error creating virtualenv. Note that some special characters (e.g. ':' and unicode symbols) in paths are not supported by virtualenv. Error details: InvocationError("Failed to get version_info for
python3.6: b''",)
If I try executing pyvenv-3.6
or python3.6
while my current python is 3.5 I get
No such command in 3.5.3 of python
My solution was executing tox twice, once per each python3 version, so that each execution creates the required virtualenv. This works because the virtualenvs tox creates are not modified unless you modify the tox.ini
file, but It's more of a dirty fix than anything else.
Am I doing something wrong? or is this the intended behavior?
This causes shims that would otherwise not exist to block the path to installations of python in later directories. Expected behavior would be for plugin-removal to delete these 'null-ptr' executables, allowing installations outside of asdf to execute. Instead the user will execute the invalid shims, receiving an error message 'No such plugin'.
this plugin expects asdf home to be ~/.asdf, but that might not be the case
if asdf is in a different folder, it does not work
I used asdf global python system
; I have pip installed in ~/.local
:
$ pip -V
pip 19.0.1 from /home/roger/.local/lib/python2.7/site-packages/pip (python 2.7)
But when I change to a directory which uses a local
python version (2.7.15), pip
no longer works:
$ cd src/foo
$ pip -V
Traceback (most recent call last):
File "/home/roger/.asdf/installs/python/2.7.15/bin/pip", line 7, in <module>
from pip import main
ImportError: cannot import name main
$ pip -V
pip 18.1 from /home/user/.asdf/installs/python/3.6.10/lib/python3.6/site-packages/pip (python 3.6)
$ pip install ps_mem
Collecting ps_mem
Downloading https://files.pythonhosted.org/packages/46/81/ff8429735e2eb13be225dcfabef16d90bfa96b559e3f2643935d33b67697/ps_mem-3.12.tar.gz
Installing collected packages: ps-mem
Running setup.py install for ps-mem ... done
Successfully installed ps-mem-3.12
You are using pip version 18.1, however version 20.2b1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
$ ps_mem
-bash: ps_mem: command not found
$ asdf reshim
$ ps_mem
Sorry, root permission required, or specify pids with -p
$ sudo ps_mem
unknown command: ps_mem. Perhaps you have to reshim?
$ asdf exec ps_mem
Sorry, root permission required, or specify pids with -p
$ sudo asdf exec ps_mem
unknown command: ps_mem. Perhaps you have to reshim?
When installing python 2.7.9, readline and openssl modules are not built and installed.
asdf install 2.7.9`
asdf local python 2.7.9
>>> import readline
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named readline
>>> import ssl
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/Chris/.asdf/installs/python/2.7.9/lib/python2.7/ssl.py", line 97, in <module>
import _ssl # if we can't import it, let the error propagate
ImportError: No module named _ssl
You can also use the arrow keys and typical ctrl-*
navigation commands and see the escape sequences being output.
Reviewing the build output, it looks the install script is setting openssl and readline options that aren't valid for python:
configure: WARNING: unrecognized options: --with-openssl-dir, --with-readline-dir, --disable-install-doc
I checked homebrew's python formula, and they are patching setup.py
's readline and openssl configurations with paths to homebrew's versions.
It seems like this is the strategy required to fix this problem. Unfortunately, my bash skills aren't sharp enough to make the change myself and PR.
Hi,
Is there any plans of integrating pipenv into the plugin?
Hi there!
asdf plugin-add python https://github.com/tuvistavie/asdf-python.git
asdf install python 2.7.9
asdf local python 2.7.9
asdf reshim python 2.7.9
python -v
Produces:
/home/john/.asdf/installs/python/2.7.9/bin/python2.7: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
I'm sticking to using Arch's python, python-pip, python2, and python2-pip packages for now but I'd like to use asdf instead.
I'm not sure what other info you might need so let me know!
I tried installing both 3.7.1 and 3.6.7 with the same result shown below. It seems Mojave may have removed zlib: https://stackoverflow.com/questions/48288658/zipimport-zipimporterror-cant-decompress-data-zlib-not-available#comment92859734_50370494.
asdf install python 3.6.7
python-build 3.6.7 /Users/geowa4/.asdf/installs/python/3.6.7
python-build: use openssl from homebrew
python-build: use readline from homebrew
Downloading Python-3.6.7.tar.xz...
-> https://www.python.org/ftp/python/3.6.7/Python-3.6.7.tar.xz
Installing Python-3.6.7...
python-build: use readline from homebrew
BUILD FAILED (OS X 10.14 using python-build 1.2.7-11-g835707da)
Inspect or clean up the working tree at /var/folders/p6/2v_qbpvs41dd7yq9c3g2cqvh0000gn/T/python-build.20181026220617.38974
Results logged to /var/folders/p6/2v_qbpvs41dd7yq9c3g2cqvh0000gn/T/python-build.20181026220617.38974.log
Last 10 log lines:
File "/private/var/folders/p6/2v_qbpvs41dd7yq9c3g2cqvh0000gn/T/python-build.20181026220617.38974/Python-3.6.7/Lib/ensurepip/__main__.py", line 5, in <module>
sys.exit(ensurepip._main())
File "/private/var/folders/p6/2v_qbpvs41dd7yq9c3g2cqvh0000gn/T/python-build.20181026220617.38974/Python-3.6.7/Lib/ensurepip/__init__.py", line 204, in _main
default_pip=args.default_pip,
File "/private/var/folders/p6/2v_qbpvs41dd7yq9c3g2cqvh0000gn/T/python-build.20181026220617.38974/Python-3.6.7/Lib/ensurepip/__init__.py", line 117, in _bootstrap
return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
File "/private/var/folders/p6/2v_qbpvs41dd7yq9c3g2cqvh0000gn/T/python-build.20181026220617.38974/Python-3.6.7/Lib/ensurepip/__init__.py", line 27, in _run_pip
import pip._internal
zipimport.ZipImportError: can't decompress data; zlib not available
make: *** [install] Error 1
similar to this: pyenv/pyenv#99
there are moments when we need to tell python to install with these options
for example, I'm trying to distribute a tool I wrote with PyInstaller, but when running the command, using Python 3.6.1 installed with asdf and within a venv, it complains that it can't find libpython3.6.dylib
Hi,
So I upgraded my mac to Sierra 10.12.2 and cannot install any version of python. It throws this error and stops abruptly.
Downloading python-build...
python-build 3.4.5 /Users/raven/.asdf/installs/python/3.4.5
Downloading Python-3.4.5.tar.xz...
-> https://www.python.org/ftp/python/3.4.5/Python-3.4.5.tar.xz
error: failed to download Python-3.4.5.tar.xz
BUILD FAILED (OS X 10.12.2 using python-build 1.0.4-11-ga73d90b)
Cleaning up
Hey there,
I've been using this plugin since 2016 (!) and asdf
is still by far my favourite version manager.
Since the start, I've had issues with asdf's python confusing applications which rely on the system
python.
In my ~/.tool-versions
, I have my python setup like so:
python system 3.8.2 2.7.17
I understand that this line will try the system python first, then try 3.8.2, then 2.7.17.
When I reshim python, then trigger my AUR package updates, I get the following error:
asdf reshim python && yay -Syu
< SNIP >
copying aigpy/__main__.py -> build/lib/aigpy
running egg_info
writing requirements to aigpy.egg-info/requires.txt
writing aigpy.egg-info/PKG-INFO
writing top-level names to aigpy.egg-info/top_level.txt
writing dependency_links to aigpy.egg-info/dependency_links.txt
reading manifest file 'aigpy.egg-info/SOURCES.txt'
writing manifest file 'aigpy.egg-info/SOURCES.txt'
==> Entering fakeroot environment...
==> Starting package_python-aigpy()...
unknown command: python. Perhaps you have to reshim?
==> ERROR: A failure occurred in package_python-aigpy().
Aborting...
Error making: python-aigpy
Looking at the python-aigpy
package, python is being called like so:
depends=(
'python2'
'python2-requests'
'python2-libconfigparser'
'python2-colorama'
'python2-mutagen'
'python2-futures'
)
cd "${srcdir}/${_pkgname}-${pkgver}-2"
python2 setup.py install --root="${pkgdir}/" --optimize=1 --skip-build
install -Dm644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
which python2
points to /home/john/.asdf/shims/python2
.
I'm not entirely sure where to go from here - how can I ensure that pacman installs packages with the system pythons?
I am using asdf on an Ubuntu 18 desktop.
Python 3.7.2 is set up, and I am trying to get appJar running. It asks for tkinter-lib but I have no clue, how to put both ends together.
Homebrew has a policy that only executables may be installed in bin/
(I asked and they won't make an exception for asdf). Therefore they install asdf-exec
to libexec/private
and thus the asdf-python shim fails.
exec $(asdf_dir)/bin/private/asdf-exec python bin/python${short_python_version} "$@"
I'm not really sure how this should be fixed, but FYI.
Ubuntu 19.10
I've used asdf to install golang on this machine in the past. now trying to install python failed.
see the full log here: https://gist.githubusercontent.com/itaysk/deed1b3a34bbe6d02299b5ae44723f7d/raw/efc41af36826ad2b674b006138611d475d8221ad/python-build.20200602081612.15621.log
Hi there,
I'm trying to follow the installation process for installing Mopidy from source using my python build from asdf. One key element of the process is the installation of python-gst-1.0
in ubuntu (or gst-python2
for me on Arch). How would I install this package within the context of asdf so I can run the program?
[john:~] 7s % mopidy
Traceback (most recent call last):
File "/home/john/.asdf/installs/python/2.7.12/bin/mopidy", line 7, in <module>
from mopidy.__main__ import main
File "/home/john/.asdf/installs/python/2.7.12/lib/python2.7/site-packages/mopidy/__main__.py", line 8, in <module>
from mopidy.internal.gi import Gst # noqa: F401
File "/home/john/.asdf/installs/python/2.7.12/lib/python2.7/site-packages/mopidy/internal/gi.py", line 9, in <module>
gi.require_version('Gst', '1.0')
AttributeError: 'module' object has no attribute 'require_version'
I currently have pyenv (1.1.5) and openssl (2.2.7) installed via homebrew. Installing 3.6.3 fails because the ssl extension wasn't compiled. The terminal output is:
asdf install python 3.6.3
python-build 3.6.3 /Users/jerome.doyle/.asdf/installs/python/3.6.3
Downloading Python-3.6.3.tar.xz...
-> https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tar.xz
Installing Python-3.6.3...
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
Please consult to the Wiki page to fix the problem.
https://github.com/pyenv/pyenv/wiki/Common-build-problems
BUILD FAILED (OS X 10.13 using python-build 1.1.5-8-g7b9d1a4)
Inspect or clean up the working tree at /var/folders/p6/k0c_hqr95_14y4z52gcq_zwm0000gn/T/python-build.20171018124832.29730
Results logged to /var/folders/p6/k0c_hqr95_14y4z52gcq_zwm0000gn/T/python-build.20171018124832.29730.log
Last 10 log lines:
upgrade) ensurepip="--upgrade" ;; \
install|*) ensurepip="" ;; \
esac; \
./python.exe -E -m ensurepip \
$ensurepip --root=/ ; \
fi
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-9.0.1 setuptools-28.8.0
Cleaning up
Received the following:
ast 10 log lines:
File "/private/var/folders/pp/8cx2m9p92hjdk1cmg6z49znw0000gn/T/python-build.20190525111851.13029/Python-3.7.2/Lib/ensurepip/__main__.py", line 5, in <module>
sys.exit(ensurepip._main())
File "/private/var/folders/pp/8cx2m9p92hjdk1cmg6z49znw0000gn/T/python-build.20190525111851.13029/Python-3.7.2/Lib/ensurepip/__init__.py", line 204, in _main
default_pip=args.default_pip,
File "/private/var/folders/pp/8cx2m9p92hjdk1cmg6z49znw0000gn/T/python-build.20190525111851.13029/Python-3.7.2/Lib/ensurepip/__init__.py", line 117, in _bootstrap
return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
File "/private/var/folders/pp/8cx2m9p92hjdk1cmg6z49znw0000gn/T/python-build.20190525111851.13029/Python-3.7.2/Lib/ensurepip/__init__.py", line 27, in _run_pip
import pip._internal
zipimport.ZipImportError: can't decompress data; zlib not available
make: *** [install] Error 1
! ~
I do have zlib installed via MacPorts. A bit rusty on how to make this visible. Also, can it be detected automatically?
installing anaconda raises this error
Last 10 log lines: /var/folders/60/24fdw4jx7vl02x0rw7f0m3lm0000gn/T/python-build.20170122172041.45403 ~/.asdf/plugins /var/folders/60/24fdw4jx7vl02x0rw7f0m3lm0000gn/T/python-build.20170122172041.45403/Anaconda2-4.2.1-MacOSX-x86_64 /var/folders/60/24fdw4jx7vl02x0rw7f0m3lm0000gn/T/python-build.20170122172041.45403 ~/.asdf/plugins ERROR: File or directory already exists: /Users/jinx/.asdf/installs/python/anaconda2-4.2.0 Cleaning up
Can be fixed by deleting the install path prior to installing python.
rm -rf "$install_path" && MAKE_OPTS="$MAKE_OPTS -j$ASDF_CONCURRENCY" TMP_DIR="$tmp_dir" $(python_build_path) $version $install_path
asdf install python 3.8.0
Results in:
python-build 3.8.0 /Users/maxim.danilov/.asdf/installs/python/3.8.0
python-build: use [email protected] from homebrew
python-build: use readline from homebrew
Downloading Python-3.8.0.tar.xz...
-> https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tar.xz
Installing Python-3.8.0...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
BUILD FAILED (OS X 10.15.1 using python-build 1.2.15-4-g089b828b)
Inspect or clean up the working tree at /var/folders/p5/msx_fqfd65545mstbnd7md380000gn/T/python-build.20191210165950.63262
Results logged to /var/folders/p5/msx_fqfd65545mstbnd7md380000gn/T/python-build.20191210165950.63262.log
Last 10 log lines:
if test $? -ne 0 ; then \
echo "generate-posix-vars failed" ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
Fatal Python error: config_get_locale_encoding: failed to get the locale encoding: nl_langinfo(CODESET) failed
Python runtime state: preinitialized
generate-posix-vars failed
make: *** [pybuilddir.txt] Error 1
Seems like this has to do something with locales.
I'm using zsh and have the following vars for locale related stuff:
export LC_ALL="en_US"
export LC_CTYPE="en_US"
export LANG="en_US"
Using asdf python plugin's pip i try to install awscli
, which gets installed properly at ~/.asdf/installs/python/3.7.0/bin
. But that location is not set on the env, so rendering awscli unusable.
Environment:
I am using Mac High Sierra and I couldn't use asdf for python at all. Below is the versions of python I have installed:
$ asdf list python
2.7
3.5
3.6.3
3.6
when I change to 3.6 as blow I couldn't run python command:
$ asdf global python 3.6
$ which python
/Users/joey/.asdf/shims/python
$ python --version
No such command in 3.6 of python
I always get No such command xx of python
for every version of python. Is there any other configuration I need to make?
After installing and doing "asdf global or local python 3.6.4" then if i do "clear" command i get
No such command in 3.6.4 of python
How to fix?
Edit: why do i have clear on shims?
$ which clear
/home/qwexvf/.asdf/shims/clear
Thanks.
using this asdf pluging , run
pip install mercurial
hg is installed, but can not be executed since it is not in PATH
bit it is in ~/.asdf/installs/python/2.7.13/bin
If you install python without all required system dependencies the install will either fail or (imho even worse) it will run through but will sometimes fail at runtime because of missing modules.
A link in the README would help.
Looks like pip
tries to install to the system python package directory instead of the asdf directory. Kind of defeats the purpose.
This is using 2.7.15
installation. I'm using fish 3.0 if that matters at all.
Hey, I know this is kind of a small thing, but I need 3.4.7 specifically. I've loved using asdf for python and I'd like to keep using it. It looks like 3.4.7 is available in pyenv: https://github.com/pyenv/pyenv/releases/tag/v1.1.4 I've tried running asdf plugin-update --all
but that didn't help. Is there something else I should do to get new Python versions?
And is there some way to automatically get new versions as they become available?
Eric
I'm running Arch, and after installing asdf-python
some packages that requires python-distutils-extra
are throwing an error during install.
This is the error:
Traceback (most recent call last):
File "setup.py", line 8, in <module>
from DistUtilsExtra.command import *
ModuleNotFoundError: No module named 'DistUtilsExtra'
This won't happen if I remove asdf-python
Can anyone help me please?
When I attempt to install any python version with this plugin, I get the following error trying to install pip:
BUILD FAILED (OS X 10.13.2 using python-build 1.1.4-4-g433e2d1)
Inspect or clean up the working tree at /var/folders/y2/6bz4kq_s029_syhvswcw7w6w0000gn/T/python-build.20171215212552.54169
Results logged to /var/folders/y2/6bz4kq_s029_syhvswcw7w6w0000gn/T/python-build.20171215212552.54169.log
Last 10 log lines:
rm -f /Users/nate/.asdf/installs/python/2.7.14/share/man/man1/python.1
(cd /Users/nate/.asdf/installs/python/2.7.14/share/man/man1; ln -s python2.1 python.1)
if test "xno" != "xno" ; then \
case no in \
upgrade) ensurepip="--upgrade" ;; \
install|*) ensurepip="" ;; \
esac; \
./python.exe -E -m ensurepip \
$ensurepip --root=/ ; \
fi
Cleaning up
This was a known issue with pyenv as well, however it has been resolved with the latest deployment on homebrew, which patches python-build to reference the correct libraries.
Is it possible to follow suit and patch asdf as well? I'm not currently able to use asdf for python and have reverted back to pyenv until a resolution can be found.
➜ folder git:(development) ✗ asdf list-all ruby | grep 1.8
jruby-9.1.8.0
1.8.5-p115
1.8.6-p114
1.8.6-p383
1.8.6-p388
1.8.6-p398
1.8.6-p399
1.8.6-p420
1.8.7-p174
1.8.7-p248
1.8.7-p249
1.8.7-p299
1.8.7-p302
1.8.7-p330
1.8.7-p334
1.8.7-p352
1.8.7-p357
1.8.7-p358
1.8.7-p370
1.8.7-p371
1.8.7-p374
2.1.8
➜ folder git:(development) ✗ asdf install ruby 1.8.7-p374
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 168 100 168 0 0 238 0 --:--:-- --:--:-- --:--:-- 238
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
pyenv provides signed releases (using git tags), at least most of the time. Ref: https://github.com/yyuu/pyenv/tags
Ref: asdf-vm/asdf#159
Hey guys, installed Anaconda3 v5.3.0 like so
$ asdf install python anaconda3-5.3.0
and it seems that something is in conflict with gettext/git now.
$ git pull
GNU gettext shell script function library version 0.19.8.1
Usage: . gettext.sh
python anaconda3-5.3.0
$ which gettext
~/.asdf/shims/gettext
where
$ cat ~/.asdf/shims/gettext
#!/usr/bin/env bash
# asdf-plugin: python
# asdf-plugin-version: anaconda3-5.3.0
exec /usr/local/opt/asdf/libexec/private/asdf-exec python bin/gettext "$@"
and
$ ls -al ~/.asdf/shims | wc -l
415
After uninstalling it
$ asdf uninstall python anaconda3-5.3.0
$ git pull
Current branch master is up to date.
🎉, and FWIW, there are far fewer shims now.
$ ls -al ~/.asdf/shims | wc -l
31
Honestly, I don't even know if this is the right place to ask this question versus this being an asdf
issue, or python, or anaconda, or something completely different?
I'm open to getting help on debugging this further, or being guided to a better place to ask this, or anything else. Thanks in advance! ✌️
$ sw_vers -productVersion
10.13.6
$ git --version
git version 2.19.1
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
On a brand new install of asdf, I tried to execute cd ~ && asdf install
with this ~/.tool-versions
file:
python 3.7.3 2.7.16
python-build 3.7.3 /home/kevin/.asdf/installs/python/3.7.3
Downloading Python-3.7.3.tar.xz...
-> https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz
Installing Python-3.7.3...
Installed Python-3.7.3 to /home/kevin/.asdf/installs/python/3.7.3
python-build 2.7.16 /home/kevin/.asdf/installs/python/2.7.16
Downloading Python-2.7.16.tar.xz...
-> https://www.python.org/ftp/python/2.7.16/Python-2.7.16.tar.xz
Installing Python-2.7.16...
Installed Python-2.7.16 to /home/kevin/.asdf/installs/python/2.7.16
python-build 3.7.3 2.7.16 /home/kevin/.asdf/installs/python/3.7.3 2.7.16
python-build: definition not found: 3.7.3 2.7.16
OS: Arch Linux
asdf version: 0.7.2
Hello!
I have a weird problem here (not sure it's asdf-python
issue though):
$ /usr/bin/python --version
$ ~/.asdf/shims/python --version
$ /usr/bin/python -c 'import sys; print("python")'
python
$ ~/.asdf/shims/python -c 'import sys; print("python")'
File "<string>", line 1
import
^
SyntaxError: invalid syntax
I would simply ignore this, but anaconda-mode
in spacemacs is using -c
to evaluate code, and throws an error every time I type something in a python file in spacemacs.
How can I use the default version of python? I set only a local version but when I'm out of that folder I can't use the system version of python.
It would be a great feature if when a new Python is installed (or the existing one is being upgraded) that a list of default "global" packages could be installed. Perhaps use a config file like $HOME/.default-pip-packages
or something to that effect. The Node asdf plugin supports this and it is really convenient for command-line tools you always want installed from PIP (like youtube-dl for instance).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.