-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
pip install in virtualenv installs lib to wrong directory #445
Comments
Just chiming in to say that I just experienced the same issue. Moving the .so file as mentioned by @praseodym worked for me as well. If it is any help in debugging, my setup is Arch Linux, with virtualenv 13.1.2, pip 7.1.2 & python 2.7.10 or python 3.4.3. I was able to reproduce this in newly created virtualenvs. |
I have the same issue on cygwin when using //edit: works fine on debian though. |
sorry that i dont use Arch Linux. if anyone knows how to fix this, please send a pull request, thanks. |
This is happening on ubuntu with capstone 3.0.4 as well. The package installs to /usr/local/lib/python2.7/dist-packages/capstone, but then it also puts libcapstone.so in /usr/local/lib/python2.7/dist-packages/usr/lib/python2.7/dist-packages/capstone/libcapstone.so Using pip install on 3.0.3 everything works fine with the python module installed to /usr/local/lib/python2.7/dist-packages/capstone and the libcapstone.so installed to /usr/lib/python2.7/dist-packages/capstone/libcapstone.so Edit: |
the latest Github code supposed to fix this issue. can you guys please confirm? thanks |
What would be the command to test this? I tried the following in a fresh virtualenv:
Pip says that it successfully installed capstone-3.0.4, but it doesn't actually compile any library. |
I noticed that
That could be solved by adding However, this is not the full solution. When running commands such as |
@scudette, do you have any comments? |
Hi raimue, Also make sure you properly remove the build and dist directories because setuptools tries to cache things and it it finds something there is will not rebuild the .so. Its easier to make it rebuild both sdist and bdist at the same time:
I think there is still a problem though. If I try to build a wheel with pip: pip wheel . It will actually build the .so but it will not include it because it seems that I have recently done some work on understanding the semantics of the https://github.com/google/rekall/blob/master/rekall-core/rekall/resources.py Finally I think the solution I came up with for capstone here: May be better because it sidesteps the entire issue - the .so is build in the same way as a python extension module. This has to work for all packaging systems because its the same as copying a normal c extension module into the package. The main difference is that it does not use cmake at all and just builds it by itself. Maybe it is better to extend |
* Import elftools properly * Add pyelftools as dep * Use elftools dep * Rm embedded elftools * Make travis use requirements.txt * Workaround capstone install bug capstone-engine/capstone#445
This appears to be finally fixed in 3.0.5 by commit ced66e3, right? At least for me, installing capstone inside a virtualenv and doing |
I did a
pip install capstone
in my virtualenv, and the lib was installed in the wrong directory, which causes the following error:Python files were installed in in
/home/xxxxx/.virtualenvs/yyyyy/lib/python2.7/site-packages/capstone/*.py(c)
Library file was installed in
/home/xxxxx/.virtualenvs/yyyyy/lib/python2.7/site-packages/home/xxxxx/.virtualenvs/yyyyy/lib/python2.7/site-packages/capstone/libcapstone.so
Moving
libcapstone.so
to the same directory as the Python files fixed the problem.The text was updated successfully, but these errors were encountered: