arzwa / wgd

Python package and CLI for whole-genome duplication related analyses. This package is deprecated in favor of https://github.com/heche-psb/wgd.
http://wgd.readthedocs.io/en/latest/
GNU General Public License v3.0
81 stars 41 forks source link

Install Error #28

Closed U201412486 closed 4 years ago

U201412486 commented 4 years ago

Hi, When I try to install the software "wgd",It report the error like this below.

  ERROR: Could not install packages due to an EnvironmentError: [(/software/wgd/.git/objects/pack/pack-0f9dbb53be2abbe014d924ad3322cd845548336c.idx', '/tmp/pip-req-build-hxhrkvnl/.git/objects/pack/pack-0f9dbb53be2abbe014d924ad3322cd845548336c.idx', "[Errno 13] Permission denied: '/tmp/pip-req-build-hxhrkvnl/.git/objects/pack/pack-0f9dbb53be2abbe014d924ad3322cd845548336c.idx'"), ('/software/wgd/.git/objects/pack/pack-0f9dbb53be2abbe014d924ad3322cd845548336c.pack', '/tmp/pip-req-build-hxhrkvnl/.git/objects/pack/pack-0f9dbb53be2abbe014d924ad3322cd845548336c.pack', "[Errno 13] Permission denied: '/tmp/pip-req-build-hxhrkvnl/.git/objects/pack/pack-0f9dbb53be2abbe014d924ad3322cd845548336c.pack'")]

And I do not have root authority.Can you give me some advice? Thanks,

arzwa commented 4 years ago

Hi, try the --user flag when doing pip install. So from within the clone repository do

pip install --user ./

that will install wgd somwhere where you do have the right permissions (usually your home folder, in my case its ~/.local/). Alternatively you can use a virtual environment using venv.

U201412486 commented 4 years ago

Hi, It reports the same error with the code of "pip install --user ./". And how can I use a virtual environment using venv ? Thanks,

arzwa commented 4 years ago

Please refer to this issue for using virtualenv.

U201412486 commented 4 years ago

It also does not work .And I use python3.7.3.

arzwa commented 4 years ago

Well, I will need some more information to be able to help you. The following works for me

virtualenv -p python3.7  ./venv  
# if the above does not work, try `python3 -m virtualenv -p python3.7  ./venv `
cd venv
source ./bin/activate
git clone https://github.com/arzwa/wgd.git
cd wgd
pip install .
# if you get an error about numpy try to run `pip install numpy` before `pip install .`

Then I am able to run wgd. If the wgd command is not found, try python3 path_to_wgd_directory/wgd_cli.py instead.

U201412486 commented 4 years ago

It is very strange.The following does not work for me virtualenv -p python3.7 ./venv cd venv source ./bin/activate git clone https://github.com/arzwa/wgd.git cd wgd pip install . It reports the following error ERROR: Could not install packages due to an EnvironmentError: [('/software/wgd/venv/wgd/.git/objects/pack/pack-0f9dbb53be2abbe014d924ad3322cd845548336c.idx', '/tmp/pip-req-build-nqgyyutc/.git/objects/pack/pack-0f9dbb53be2abbe014d924ad3322cd845548336c.idx', "[Errno 13] Permission denied: '/tmp/pip-req-build-nqgyyutc/.git/objects/pack/pack-0f9dbb53be2abbe014d924ad3322cd845548336c.idx'"), ('/software/wgd/venv/wgd/.git/objects/pack/pack0f9dbb53be2abbe014d924ad3322cd845548336c.pack', '/tmp/pip-req-build-nqgyyutc/.git/objects/pack/pack-0f9dbb53be2abbe014d924ad3322cd845548336c.pack', "[Errno 13] Permission denied: '/tmp/pip-req-build-nqgyyutc/.git/objects/pack/pack0f9dbb53be2abbe014d924ad3322cd845548336c.pack'")]