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

Dartpy importing Issue on virtualenv #1507

Open
2 tasks done
shbang91 opened this issue Sep 23, 2020 · 6 comments
Open
2 tasks done

Dartpy importing Issue on virtualenv #1507

shbang91 opened this issue Sep 23, 2020 · 6 comments
Labels
type: bug Indicates an unexpected problem or unintended behavior

Comments

@shbang91
Copy link

shbang91 commented Sep 23, 2020

Bug Report

Please answer the following questions for yourself before reporting a bug.

  • I checked the documentation and the forum but found no answer.
  • I checked to make sure that this issue has not already been filed.

Environment

Select the following information.

  • DART version: dartpy
  • OS name and version name(or number): macOS Catalina
  • Compiler : Clang 11.0
  • I created a virtual environment using pip3 install virtualenv and it uses my system python 3.7.

Current Behavior

What is the current behavior?
After pip3 install dartpy, I can find a dartpy.so in the lib directory in my virtual environment. However, when I try importing dartpy in python, e.g., import dartpy, it spits out the segmentation fault error.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Create a virtual environment using pip3 install virtualenv
  2. Install dartpy by using pip3 install dartpy
  3. Using python, import dartpy
  4. You'll get the segmentation fault on your screen
@shbang91 shbang91 added the type: bug Indicates an unexpected problem or unintended behavior label Sep 23, 2020
@jslee02
Copy link
Member

jslee02 commented Sep 23, 2020

Quick check: Have you installed all the dependencies?
http://dartsim.github.io/install_dartpy_on_macos.html#install-dartpy-using-pip3

@shbang91
Copy link
Author

Yeah, I double-checked all the dependencies, but it still shows segmentation fault when importing dartpy library.

@jslee02
Copy link
Member

jslee02 commented Sep 23, 2020

Hm, I wasn't able to reproduce the segfault on my macOS (Catalina). Here is what I see when installing dartpy:

(venv) ➜  tmp10 pip3 install dartpy -U
Collecting dartpy
  Downloading dartpy-0.0.1.post11.tar.gz (1.4 MB)
     |████████████████████████████████| 1.4 MB 1.0 MB/s
Building wheels for collected packages: dartpy
  Building wheel for dartpy (setup.py) ... done
  Created wheel for dartpy: filename=dartpy-0.0.1.post11-cp38-cp38-macosx_10_14_x86_64.whl size=2080 sha256=87033e8319d71ebec1d1495ddf39a13a5a77fba01729a983096656744d8f69a8
  Stored in directory: /Users/jeoslee/Library/Caches/pip/wheels/cb/33/d9/ccc9b71a55c7939af21d354dfc64fa09ab2f814e8c728cdc0a
Successfully built dartpy
Installing collected packages: dartpy
Successfully installed dartpy-0.0.1.post11
WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
You should consider upgrading via the '/Users/jeoslee/tmp10/venv/bin/python -m pip install --upgrade pip' command.
(venv) ➜  tmp10 python
Python 3.8.5 (default, Jul 21 2020, 10:42:08)
[Clang 11.0.0 (clang-1100.0.33.17)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import dartpy
>>> dartpy.__file__
'/Users/jeoslee/tmp10/venv/lib/python3.8/site-packages/dartpy.so'

Do you see any error message when it segfaults?

@shbang91
Copy link
Author

shbang91 commented Sep 23, 2020

It just shows segmentation fault: 11 as below:

[pypnc] seunghyeonbang ~ python
Python 3.7.3 (default, Dec 13 2019, 19:58:14)
[Clang 11.0.0 (clang-1100.0.33.17)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import dartpy
Segmentation fault: 11

So, I was trying to uninstall dartpy by doing pip3 uninstall dartpy, but it didn't completely remove dartpy.so, which leads to incorrect reinstalling as you mentioned on: https://dartsim.github.io/install_dartpy_on_macos.html.
Do you have any suggestion?

@jslee02
Copy link
Member

jslee02 commented Sep 24, 2020

What do you see if you run Python with -v option and try to import dartpy?:

[pypnc]seunghyeonbang ~ python -v
>>> import dartpy

To uninstall, you could safely remove dartpy.so manually (by running sudo rm <path_to_dartpy.so>/dartpyso as it's the only file installed (without changing any other system configurations).

@shbang91
Copy link
Author

shbang91 commented Sep 24, 2020

I manually removed dartpy.so in the lib directory and tried to reinstall dartpy by doing pip3 install dartpy. But, I don't see dartpy.so in the lib directory so I cannot import dartpy right now as you suggested. Here is the result:
[pypnc] seunghyeonbang ~ pip3 install dartpy
Requirement already satisfied: dartpy in ./.venv/pypnc/lib/python3.7/site-packages (0.0.1.post11)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants