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

Installation without conda #34

Open
jenniferlu717 opened this issue Mar 7, 2024 · 3 comments
Open

Installation without conda #34

jenniferlu717 opened this issue Mar 7, 2024 · 3 comments

Comments

@jenniferlu717
Copy link

Hello, I am trying to see if I can install this software without using conda as I'm trying to develop a toolset that has the option of installing with/without conda.

I can install taxonkit using pip but it doesnt seem that pip install works with this

@standage
Copy link
Member

standage commented Mar 8, 2024

Hi @jenniferlu717! 👋

pytaxonkit should be fairly straightforward to install without Conda. It's all contained in a single module (file) that can either be placed in the environment (lib/python3.x/site-packages/) or bundled with your software.

I can install taxonkit using pip

Really? taxonkit is implemented in Go, not Python, so I'd be surprised if it can be installed with pip.

Let me know if I can answer any specific questions with installation or integration.

@jenniferlu717
Copy link
Author

jenniferlu717 commented Mar 14, 2024

Thanks for the quick response
I am trying to include pytaxonkit in my software but it seems to have an issue here:

import pytaxonkit
  File "/home/ec2-user/MYPACKAGE/src/pytaxonkit.py", line 55, in <module>
    from _version import get_versions
ImportError: cannot import name 'get_versions' from '_version' (/usr/lib/python3.9/site-packages/_version.py)

@standage
Copy link
Member

standage commented Mar 14, 2024

Accept my apologies, it looks like my comments above weren't accurate.

Out of the box, pytaxonkit uses versioneer for managing software version numbers with git. So using pytaxonkit will require either making a small change to pytaxonkit.py or including the _version.py script alongside pytaxonkit.py.

Option 1

You should be able to make a simple edit to pytaxonkit.py to hard-code the version number and eliminate the dependency on versioneer.

@@ -52,10 +52,7 @@
 from tempfile import NamedTemporaryFile
 from warnings import warn
 
-from _version import get_versions
-
-__version__ = get_versions()["version"]
-del get_versions
+__version__ = 0.9
 
 
 class TaxonKitCLIError(RuntimeError):

Option 2

You can download the latest version tarball from github and run pip install pytaxonkit-0.9.tar.gz. Alternatively, you should be able to streamline that into a single step with

pip install git+https://github.com/bioforensics/[email protected]

This latter option installs pytaxonkit.py and _version.py to your Python environment. Because PyTaxonKit is a single module and not a fully-fledged package, I should probably rename _version.py to something like pytaxonkit_version.py. But that shouldn't be a concern for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants