Coder Social home page Coder Social logo

Comments (21)

danhper avatar danhper commented on June 12, 2024 7

Indeed, pip should be there.
Maybe try asdf reshim after you install Python.
Please comment if this does not resolve the issue.

from asdf-python.

viniciusban avatar viniciusban commented on June 12, 2024 6

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

from asdf-python.

jkpr avatar jkpr commented on June 12, 2024 4

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.

from asdf-python.

cddr avatar cddr commented on June 12, 2024 4

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

from asdf-python.

NewAlexandria avatar NewAlexandria commented on June 12, 2024 2

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)

from asdf-python.

NewAlexandria avatar NewAlexandria commented on June 12, 2024 1

@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.

from asdf-python.

eknowlton avatar eknowlton commented on June 12, 2024

pip should be included with the installation.

from asdf-python.

danhper avatar danhper commented on June 12, 2024

What version of python did you install?

from asdf-python.

NewAlexandria avatar NewAlexandria commented on June 12, 2024

3.8.0

from asdf-python.

danhper avatar danhper commented on June 12, 2024

Could you check the result of the following commands please?

echo $PATH
which python
asdf current
asdf which pip

from asdf-python.

typecasto avatar typecasto commented on June 12, 2024

I just went with pipenv instead, as it suits my needs better.

from asdf-python.

danhper avatar danhper commented on June 12, 2024

Ok, if it seems to be working for everyone I'll leave this issue closed.
Please open a new issue if needed.

from asdf-python.

NewAlexandria avatar NewAlexandria commented on June 12, 2024

Going to ping here and maybe re-open the matter. I've setup another laptop recently, and am having the same issue.

  • asdf installed
  • osx 10.15.4
  • oh-my-zsh
  • asdf integrated via .zshrc line of plugins=(git asdf)
  • asdf with pythons 2.7.0 and 3.8.0.
  • OS has python 3.7.0
 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?

from asdf-python.

NewAlexandria avatar NewAlexandria commented on June 12, 2024

Closing again :(
My path was borked. Good note for others, though.

from asdf-python.

NewAlexandria avatar NewAlexandria commented on June 12, 2024

My path had lots of other things prepended to it, via twisty tunnel of shell configs

from asdf-python.

dialex avatar dialex commented on June 12, 2024

Well I'm getting the same issue. I installed asdf with brew and had to use this fix.

  • asdf installed with brew
  • osx 11.0.1
  • oh-my-zsh
  • asdf integrated via .zshrc line (see fix)
  • asdf with python 3.9.0
  • OS has python 2.7.16
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.

from asdf-python.

aronreisx avatar aronreisx commented on June 12, 2024

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.

from asdf-python.

gitaarik avatar gitaarik commented on June 12, 2024

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.

from asdf-python.

Burtannia avatar Burtannia commented on June 12, 2024

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

from asdf-python.

tbrechner avatar tbrechner commented on June 12, 2024

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

from asdf-python.

Marca01 avatar Marca01 commented on June 12, 2024

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

I have the same issue. The package was installed in .local not .asdf

from asdf-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.