Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue after upgrading python to 3.7 #2775

Closed
BeyondEvil opened this issue Aug 24, 2018 · 12 comments
Closed

Issue after upgrading python to 3.7 #2775

BeyondEvil opened this issue Aug 24, 2018 · 12 comments

Comments

@BeyondEvil
Copy link

Issue description

I'm on a Mac and installed pre-commit using brew and without even asking for it got upgraded from python 3.6.5 to 3.7. (3.6.5 was also under the control of brew)

Now pipenv fails with "Library not loaded"-error.

Expected result

Pipenv to work as before the python upgrade.

Actual result
$ pipenv -h
dyld: Library not loaded: @executable_path/../.Python
  Referenced from: /usr/local/Cellar/pipenv/2018.5.18/libexec/bin/python3.6
  Reason: image not found
Abort trap: 6
Comments
  1. What's the proper way of fixing the issue? Can I edit some config-file to point to 3.7 instead?

  2. Could pipenv perhaps be more lenient and rely on the python3 binary instead of the python3.6?

@omrihar
Copy link

omrihar commented Aug 24, 2018

I am having a similar issue - where arch linux upgraded from 3.6.5 to 3.7 and now I get an error whenever I try to run pipenv. What works for me, but it is indeed a bit of an ugly hack, is to first upgrade pip, reinstall pipenv and for every repository using pipenv, erase the virtualenvironment and recreate it.
I do something like:

rm -rf `pipenv --venv`
pipenv install --dev

and this seems to do the job.

Note: you should also probably change the requirement in the Pipfile from python 3.6 to 3.7.

I hope this helps, but I'm also wondering if there is a more robust solution...

@uranusjr
Copy link
Member

uranusjr commented Aug 24, 2018

That is related to how Homebrew configures Python. There is nothing Pipenv (or any Python libraries) can do about it. DO NOT install things on a Homebrew Python if you don’t want this to happen. If it does, re-installing is your only option.

I remember I commented on a similar issue a few days ago, but couldn’t find it at the moment :(

@rgdonohue
Copy link

@uranusjr Isn't this recommended by the docs though?

@uranusjr
Copy link
Member

Yes, so?

@techalchemy
Copy link
Member

Homebrew installs are kind of complicated and outside of our control, you assume some risk if you use them (neither of us uses a Mac so we really can't offer much insight on that)

@ohadperry
Copy link

what worked for me was
brew uninstall mkcert

@grisaitis
Copy link

grisaitis commented Feb 13, 2019

What worked for me was just nuking all my envs: rm -rf /Users/william/.local/share/virtualenvs/*, and reinstalling envs with pipenv install.

@omrihar why the --dev flag? The docs say "Install both develop and default packages." Does this mean installing local packages (e.g. python setup.py develop)?

Edit: using brew-installed pipenv (2018.11.26_2) w/ python3.7. I was having issues at the locking phase of install, e.g. Locking Failed! or just hanging at Locking

@stardust85
Copy link

stardust85 commented Mar 7, 2019

what helped to us was:

$ brew uninstall pipenv
$ brew install python3.6
$ pip3 install --user pipenv
$ mkdir -p ~/bin
$ ln -s ../Library/Python/3.6/bin/pipenv ~/bin/

and if you didn't do so yet, add ~/bin/ to your PATH by editing the PATH line in ~/.bash_profile:

...
PATH=/Users/{your_username}/bin:{the_content_that_was_there_before}
...

Don't forget to close and open shell

@isaachui
Copy link

I was running into this issue, and solved it by running according to the docs

brew upgrade pipenv

@edmundonm
Copy link

I ran into the same issue after upgrading OSX version.

Solved by uninstalling homebrew installation and then following the "Pragmatic Installation" instructions:

pip install --user pipenv

Don't forget to add the user base’s binary directory to your PATH per the instructions.

@royby-cyberark
Copy link

Hi, i'm getting the same errors, but i'm not sure what I need to uninstall and how.
I tried installing pipenv and got the errors, then saw that it wasn't installed. and looking in brew logs, I see that it seem to have installed python3.8, which AFAIK was not installed before (i'm using 3.7)

Trying to uninstall python@3.8 did not work since awscli depends on it, which doesn't make sense if it wasn't installed before...

What do I generally need to uninstall to solve this issue?
the only logs in ~/Library/Logs/Homebrew are of python@3.8 from the time of the installation.
it seems to me that I need to uninstall it, seems right? (maybe awscli was updated or something...)

thanks for your help.

@royby-cyberark
Copy link

Uninstalling python did the trick. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests