Code Monkey home page Code Monkey logo

Comments (11)

mmartinson avatar mmartinson commented on July 29, 2024

Good question. This is clearly and issue for others as well. It could be in the docs at least.

from asdf-python.

natecox avatar natecox commented on July 29, 2024

haha, I run into this question every time I get someone new to use asdf.

It's definitely an issue, but because pip isn't a part of asdf I'm not sure that it's within the domain of asdf to modify a workflow. Better documentation is probably the correct solution.

from asdf-python.

fozcodes avatar fozcodes commented on July 29, 2024

🤔 I suppose. But the same argument could be made for bundler in Ruby. Whereas, in Ruby I never have to reshim after installing. Maybe I don't understand the inner workings of pip or pipenv that well. I'm just getting started with Python. It does install the packages as part of the current asdf python and then symlink them, correct?

from asdf-python.

natecox avatar natecox commented on July 29, 2024

You’re probably just getting lucky. I’ve had issues with forgetting to reshim for every language I use asdf for; python, ruby, node, elixir, erlang, elm, etc.

It’s inconsistent and I can’t explain what makes it work fine sometimes and poorly others, but certainly not isolated to python.

I imagine virtualenvs switching their own shimming around probably contributes.

from asdf-python.

danhper avatar danhper commented on July 29, 2024

This is the intended behavior, as I am not a big fan of doing things under the hood.
Automatic reshim has caused quite a few issues with npm global installs too.
That said, I wouldn't mind accepting a PR to reshim automatically as long as we have a way to disable the behavior (maybe through ~/.asdfrc)
Thanks!

from asdf-python.

tammersaleh avatar tammersaleh commented on July 29, 2024

When would the reshim happen? Is the feature request to wrap pip/pip3 with an asdf-aware script that runs reshim at the end?

from asdf-python.

danhper avatar danhper commented on July 29, 2024

I know that other tools (e.g. gem for Ruby or npm for Node) offer post-installation hooks, which avoids the need for a wrapper.
Do you have any idea if such a hook exists for pip?
Otherwise, I think a wrapper could be a decent solution but I wonder if there could be any unwanted side effects?

from asdf-python.

dikaio avatar dikaio commented on July 29, 2024

Wouldn't it be possible to just create an aliases that reshims after each install?

e.g. alias gem install="gem install $ && asdf reshim ruby" and then do the same for pip, rust, node etc.

from asdf-python.

danhper avatar danhper commented on July 29, 2024

This is actually quite similar to what pyenv is doing, for example:
https://github.com/pyenv/pyenv/blob/d08c9cfb362c5a7e18a92acd2253a16935ad9a99/pyenv.d/exec/pip-rehash/pip
I personally do not mind about manually running reshim but is someone wants to send a PR to support this I would not mind merging it either.

from asdf-python.

philipbjorge avatar philipbjorge commented on July 29, 2024

It looks like in master of asdf right now, there is some new support for auto reshimming.

asdf-vm/asdf#409
asdf-vm/asdf#434

from asdf-python.

idoo avatar idoo commented on July 29, 2024

thank you @fozcodes for creating this issue, it works well for me for ruby, however, with python, I have to run reshim manually

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.