Creating a new Virtual Environment for PyPy3 in PyCharm

1.3k views Asked by At

When I try to create a new virtual environment using pypy3 as the base interpreter I get this error in PyCharm:

I'm using a MacOS sierra on a 64-bit MacBook pro late-2015 with PyCharm 2016.3

Executed Command:

/Applications/PyCharm CE.app/Contents/helpers/packaging_tool.py list

Command Output:

dyld: Library not loaded: @rpath/libpypy-c.dylib
  Referenced from: /Users/3228991/.virtualenvs/pypy3_venv/bin/python
  Reason: image not found
1

There are 1 answers

3
nuriselcuk On BEST ANSWER
dyld: Library not loaded: @rpath/libpypy-c.dylib
  Referenced from: /Users/3228991/.virtualenvs/pypy3_venv/bin/python
  Reason: image not found

Means that your program is using a dynamic library called libpypy-c.dylib, although you linked your dynamic library to your program during compiling. But you have to tell your program where is the dylib in run-time in Pycharm.

Set up dynamic library environment variables for your project:

1.Run/Edit Configurations

2.Click Python, below the "Before Launch" click the "+" button

3.Put DYLD_LIBRARY_PATH to Name box

4.Put the path where your libpypy-c.dylib file is in Program box