biocore / pyqi

Tools for developing and testing command line interfaces in Python.
Other
9 stars 13 forks source link

pyqi error with updated biom #266

Closed jrherr closed 9 years ago

jrherr commented 9 years ago

I'm using biom and with the recent update, I'm getting this pyqi error:

Traceback (most recent call last):
File "/Users/josh/anaconda/bin/pyqi", line 4, in <module>
__import__('pkg_resources').run_script('pyqi==0.3.2', 'pyqi')
File "/Users/josh/anaconda/lib/python2.7/site-packages/pkg_resources/__init__.py", line 696, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/Users/josh/anaconda/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1606, in run_script
raise ResolutionError("No script named %r" % script_name)
pkg_resources.ResolutionError: No script named 'pyqi'

I think I have pyqi installed correctly:

~  which pyqi
/Users/josh/anaconda/bin/pyqi

and

~  pip install pyqi --upgrade
Requirement already up-to-date: pyqi in ./anaconda/lib/python2.7/site-packages

and also tried to update from yoshiki's version on binstar:

~  binstar show yoshiki/pyqi
Using binstar api site https://api.binstar.org
Name:    pyqi
Summary: pyqi: expose your interface
Access:  public
Package Types:  conda
Versions:
   + 0.3.2

~  conda install --channel https://conda.binstar.org/yoshiki pyqi
Fetching package metadata: ......
Solving package specifications: .
# All requested packages already installed.
# packages in environment at /Users/josh/anaconda:
#
pyqi                      0.3.2                    py27_0

Even after all those messages I still get the biom error above? Any recommendations of how to fix this -- any idea if this is it a pyqi issue or a biom-format issue?

Also I'm on a Mac OSX Yosemite machine managing packages with Anaconda. Doesn't seem to be a problem on that end though...

ElDeveloper commented 9 years ago

@Jorge-C encountered this issue before but I think it was solved, maybe try updating your version of conda? Or try uninstalling the conda-installed version and installing pyqi through pip.

On (Feb-16-15|13:41), Josh Herr wrote:

I'm using biom and with the recent update, I'm getting this pyqi error:

Traceback (most recent call last):
File "/Users/josh/anaconda/bin/pyqi", line 4, in <module>
__import__('pkg_resources').run_script('pyqi==0.3.2', 'pyqi')
File "/Users/josh/anaconda/lib/python2.7/site-packages/pkg_resources/__init__.py", line 696, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/Users/josh/anaconda/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1606, in run_script
raise ResolutionError("No script named %r" % script_name)
pkg_resources.ResolutionError: No script named 'pyqi'

I think I have pyqi installed correctly:

~  which pyqi
/Users/josh/anaconda/bin/pyqi

and

~  pip install pyqi --upgrade
Requirement already up-to-date: pyqi in ./anaconda/lib/python2.7/site-packages

and also tried to update from yoshiki's version on binstar:

~  binstar show yoshiki/pyqi
Using binstar api site https://api.binstar.org
Name:    pyqi
Summary: pyqi: expose your interface
Access:  public
Package Types:  conda
Versions:
   + 0.3.2

~  conda install --channel https://conda.binstar.org/yoshiki pyqi
Fetching package metadata: ......
Solving package specifications: .
# All requested packages already installed.
# packages in environment at /Users/josh/anaconda:
#
pyqi                      0.3.2                    py27_0

Even after all those messages I still get the biom error above? Any recommendations of how to fix this -- any idea if this is it a pyqi issue or a biom-format issue?


Reply to this email directly or view it on GitHub: https://github.com/biocore/pyqi/issues/266

jrherr commented 9 years ago

Both options here still give me a pyqi not found error:

~  conda update conda && conda update anaconda
Fetching package metadata: ....
# All requested packages already installed.
# packages in environment at /Users/josh/anaconda:
#
conda                     3.9.0                    py27_0  
Fetching package metadata: ....
# All requested packages already installed.
# packages in environment at /Users/josh/anaconda:
#
anaconda                  2.1.0                np19py27_0  
~  biom convert -h
Traceback (most recent call last):
  File "/Users/josh/anaconda/bin/pyqi", line 4, in <module>
    __import__('pkg_resources').run_script('pyqi==0.3.2', 'pyqi')
  File "/Users/josh/anaconda/lib/python2.7/site-packages/pkg_resources/__init__.py", line 696, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/Users/josh/anaconda/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1606, in run_script
    raise ResolutionError("No script named %r" % script_name)
pkg_resources.ResolutionError: No script named 'pyqi'

and

conda uninstall pyqi && pip install pyqi
Fetching package metadata: ....

Package plan for package removal in environment /Users/josh/anaconda:

The following packages will be REMOVED:

    pyqi: 0.3.2-py27_0

Proceed ([y]/n)? y

Unlinking packages ...
[      COMPLETE      ] |#######################################################| 100%
Requirement already satisfied (use --upgrade to upgrade): pyqi in ./anaconda/lib/python2.7/site-packages
~  pip install pyqi
Requirement already satisfied (use --upgrade to upgrade): pyqi in ./anaconda/lib/python2.7/site-packages
~  pip install pyqi --upgrade
Requirement already up-to-date: pyqi in ./anaconda/lib/python2.7/site-packages
~  biom convert -h
/Users/josh/anaconda/bin/biom: line 22: exec: pyqi: not found

Not sure what I need to do here to go this to work... Thanks for your help.

ElDeveloper commented 9 years ago

@jrherr hmmm, can you try creating a new virtual environment and then trying to install qiime or pyqi there? You can do that as follows:

conda create -n testing-install python=2.7 anaconda
source activate testing-install
conda install --channel https://conda.binstar.org/yoshiki pyqi

I just tried this in a new environment and it worked fine. I'm also running OS X Yosemite and version 3.8.4 of conda.

If problems persist, maybe try reinstalling conda?

jrherr commented 9 years ago

Yes, I should have tried this before opening the issue, but using a virtual environment fixed it for me. I'll keep playing with the installations so it works in my native conda installation, but at least this has the biom tools working for me now. Must be something not playing well with another package, but I'm not sure right now. Thanks @ElDeveloper!

ElDeveloper commented 9 years ago

Good to hear this worked for you! I think I've seen this in other cases and it is usually the result of a bad installation, python setuptools is buggy on that regard. In general my solution tends to be to nuke everything and start from scratch, but I wish I could have a better way to resolve this problem.

On (Feb-17-15|12:45), Josh Herr wrote:

Yes, I should have tried this before opening the issue, but using a virtual environment fixed it for me. I'll keep playing with the installations so it works in my native conda installation, but at least this has the biom tools working for me now. Must be something not playing well with another package, but I'm not sure right now. Thanks @ElDeveloper!


Reply to this email directly or view it on GitHub: https://github.com/biocore/pyqi/issues/266#issuecomment-74749613

Jorge-C commented 9 years ago

Thanks @ElDeveloper!

@jrherr, I'm afraid I don't really know what might be the cause of the problem in you root environment though...

jrherr commented 9 years ago

That's ok -- I can use the biom format tools in the virtual env, so it's ok for now. Thank you both @ElDeveloper @Jorge-C for your help and hard work!