2

I worked on a previous project (let's call it A) using virtualenvwrapper.
But after reading about Pipenv, I decided to use it for my new project (B).
Now, when I try to run project A I get this error:

dyld: Library not loaded: @executable_path/../.Python
 Referenced from: ...virtualenvs/A/bin/python
 Reason: image not found

I saw other questions about this error, but there it was happening after updating Mac/Python versions. This is not the case for me :(

Can you please help?

lmaayanl
  • 378
  • 1
  • 2
  • 15
  • Is it possible that you accidentally installed pipenv from *inside* your virtualenvwrapper? Happenned to me once with some similar installations, and what helped was uninstalling the latter and then reinstalling from the root environment. – DalyaG Dec 18 '19 at 21:37
  • Thanks for the suggestion! but I checked and it's not the case for me :) – lmaayanl Dec 18 '19 at 21:55
  • You may want to check this out if you haven't already https://stackoverflow.com/questions/23233252/broken-references-in-virtualenvs – Ryan Marvin Dec 18 '19 at 22:59

1 Answers1

0

So thanks to @ryan-marvin's comment I found the answer. It's in here - Broken references in Virtualenvs.

But the thing is, it's not exactly the same situation because for me, this command: ls -la ~/.virtualenvs/my-virtual-env pointed to the correct python location (Because I didn't change my python).

But still I needed to run the same commands to fix the broken links:

gfind ~/.virtualenvs/my-virtual-env/ -type l -xtype l -delete
virtualenv ~/.virtualenvs/my-virtual-env

(You can install gfind with Homebrew)

And of course credit to the author.

lmaayanl
  • 378
  • 1
  • 2
  • 15