Closed typecasto closed 5 years ago
pip
should be included with the installation.
Indeed, pip should be there.
Maybe try asdf reshim
after you install Python.
Please comment if this does not resolve the issue.
It did not solve the issue for me @danhper - still exploring how pip is wired to python. my pip
and pip3
all reference the OS-native version (OSX 10.14)
What version of python did you install?
3.8.0
Could you check the result of the following commands please?
echo $PATH
which python
asdf current
asdf which pip
I just went with pipenv instead, as it suits my needs better.
@danhper I don't know what it was now, sorry. I had fished around with my /usr/local
links, I think. Pardon that I forget what I did, but I no longer have any issue installing any binary.
👍 asdf
is bueno.
Ok, if it seems to be working for everyone I'll leave this issue closed. Please open a new issue if needed.
Going to ping here and maybe re-open the matter. I've setup another laptop recently, and am having the same issue.
.zshrc
line of plugins=(git asdf)
which python
/Users/newalexandria/.asdf/shims/python
asdf which pip
/Users/newalexandria/.asdf/installs/python/3.8.0/bin/pip
which pip
/usr/local/bin/pip
Did I miss a configuration step?
Closing again :( My path was borked. Good note for others, though.
Did I miss a configuration step?
If you did set the asdf current python version, you should be able to:
$ python -m pip install you_package
My path had lots of other things prepended to it, via twisty tunnel of shell configs
Well I'm getting the same issue. I installed asdf
with brew and had to use this fix.
echo $PATH
/usr/local/opt/asdf/shims:/usr/local/opt/asdf/bin:/usr/local/opt/asdf//shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
which python
/usr/bin/python
asdf current
Oohes nooes ~! No plugins installed
asdf which pip
unknown command: pip. Perhaps you have to reshim?
reshim didn't fix the issue. What am I missing?
Update: 🤔 hmmm apparently after I applied the brew fix it no longer detects the python asdf plugin. I installed it again. Ok now it works. ✅
❯ asdf current 2m 26s
python 3.9.0 /Users/dnr8329/.tool-versions
❯ pip -V
pip 20.2.3 from /usr/local/opt/asdf/installs/python/3.9.0/lib/python3.9/site-packages/pip (python 3.9)
So brew users must be aware of that fix, otherwise it will mess up the installation.
If you have the right python, then you can always use python -m pip COMMAND
to make sure you are using pip for that python.
Hi,
I'm on linux and face this problem. I'm new to asdf and had probably previously borked my python installation by upgrading the distribution from whatever the previous version of ubuntu was to focal. Here are the diagnostics...
which python
/home/andy/.asdf/shims/python
asdf current
clojure ______ No version set. Run "asdf <global|shell|local> clojure <version>"
python 3.8.8 /home/andy/.tool-versions
asdf which pip
unknown command: pip. Perhaps you have to reshim
When I try to reshim, after entering the command, a new prompt is displayed but nothing else seems to happen. I can confirm (for anyone else stumbling across this thread) the suggested workaround of using python -m pip COMMAND
does work
python -m pip <command-name>
seems fine, although I am very use to the old approach that you could just type pip <command-name>
On the Linux, using Zsh, I did just add an alias to my .zshrc
file:
alias pip="python -m pip"
Suits just fine.
I also have this problem on Arch 5.15.63-1-lts
. With python -m pip
it indeed works, and then install Pipenv with python -m pip install pipenv
and then use Pipenv with python -m pipenv install <package>
.
Why aren't the asdf shims working? It does seem to work for newer versions of python installed through asdf.
I am also having this issue. Using pip
references the system level install of Python rather than the asdf version. Using python -m pip
is a sufficient work around for now but it would be nice to just use pip
.
echo $PATH
/Users/jburton/.docker/bin:/Users/jburton/google-cloud-sdk/bin:/usr/local/Cellar/rabbitmq/3.8.16/sbin:/Users/jburton/.local/bin:~/.mix/escripts:/Users/jburton/bin:/usr/local/bin:/Users/jburton/.asdf/shims:/Users/jburton/.asdf/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/local/go/bin:/usr/local/MacGPG2/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/Users/jburton/.docker/bin:/Users/jburton/.cabal/bin:/Users/jburton/.ghcup/bin:/Users/jburton/google-cloud-sdk/bin:/usr/local/Cellar/rabbitmq/3.8.16/sbin:/Users/jburton/.local/bin:~/.mix/escripts:/Users/jburton/bin:/Users/jburton/.cargo/bin:
which python
/Users/jburton/.asdf/shims/python
asdf current
python 3.11.1 /Users/jburton/Projects/gcf-101/.tool-versions
asdf which pip
/Users/jburton/.asdf/plugins/python/shims/pip
Edit: Nevermind, VSCode was using the Python interpreter of my system at /usr/bin/python3 instead of the asdf version. I have fixed it by switching the Python interpreter.
I am also having this issue. VSCode is stating ImportError: Missing optional dependency 'Jinja2'. DataFrame.style requires jinja2. Use pip or conda to install Jinja2.
However, when I attempt to install it using pip install jinja2
or python -m pip install jinja2
, it seems successful:
Collecting jinja2
Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Requirement already satisfied: MarkupSafe>=2.0 in ./.asdf/installs/python/3.11.4/lib/python3.11/site-packages (from jinja2) (2.1.3)
Installing collected packages: jinja2
Successfully installed jinja2-3.1.2
However, I still get that same error in VSCode that I am missing the dependency. I have attempted using `asdf reshim` too.
echo $PATH
/Users/myusername/.asdf/shims:/Users/myusername/.asdf/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
which python
/Users/myusername/.asdf/shims/python
asdf current
python 3.11.4 /Users/myusername/.tool-versions
asdf which pip
/Users/myusername/.asdf/plugins/python/shims/pip
Edit: Nevermind, VSCode was using the Python interpreter of my system at /usr/bin/python3 instead of the asdf version. I have fixed it by switching the Python interpreter.
I am also having this issue. VSCode is stating
ImportError: Missing optional dependency 'Jinja2'. DataFrame.style requires jinja2. Use pip or conda to install Jinja2.
However, when I attempt to install it usingpip install jinja2
orpython -m pip install jinja2
, it seems successful:Collecting jinja2 Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB) Requirement already satisfied: MarkupSafe>=2.0 in ./.asdf/installs/python/3.11.4/lib/python3.11/site-packages (from jinja2) (2.1.3) Installing collected packages: jinja2 Successfully installed jinja2-3.1.2 However, I still get that same error in VSCode that I am missing the dependency. I have attempted using `asdf reshim` too.
echo $PATH /Users/myusername/.asdf/shims:/Users/myusername/.asdf/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin which python /Users/myusername/.asdf/shims/python asdf current python 3.11.4 /Users/myusername/.tool-versions asdf which pip /Users/myusername/.asdf/plugins/python/shims/pip
I have the same issue. The package was installed in .local not .asdf
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.