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

pip install not working #14

Open
BjornFJohansson opened this issue Sep 16, 2021 · 17 comments
Open

pip install not working #14

BjornFJohansson opened this issue Sep 16, 2021 · 17 comments

Comments

@BjornFJohansson
Copy link
Collaborator

I think it is the 2to3 option in setup.py.
Is 2to3 still needed?

Collecting CAI Using cached CAI-1.0.3.tar.gz (6.0 kB) ERROR: Command errored out with exit status 1: command: /home/bjorn/anaconda3/envs/new39/bin/python3.9 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-y9phjkp9/cai_8c869096cf864cb8934fa27a731d3393/setup.py'"'"'; __file__='"'"'/tmp/pip-install-y9phjkp9/cai_8c869096cf864cb8934fa27a731d3393/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-52f8wm2g cwd: /tmp/pip-install-y9phjkp9/cai_8c869096cf864cb8934fa27a731d3393/ Complete output (1 lines): error in CAI setup command: use_2to3 is invalid.

@BjornFJohansson
Copy link
Collaborator Author

Hi @Benjamin-Lee

Are you interested in maintaining CAI in the future? If not, I can make a friendly fork and update so that
it remains useable.

cheers,
Björn

@Benjamin-Lee
Copy link
Owner

I'm definitely still interested, just super swamped. Making you an admin on the repo so we don't need to fork

@BjornFJohansson
Copy link
Collaborator Author

I'm definitely still interested, just super swamped. Making you an admin on the repo so we don't need to fork

Hi, missed the invite, could you resend it ?

@Benjamin-Lee
Copy link
Owner

Resent! Here's the link if it doesn't show up: https://github.com/Benjamin-Lee/CodonAdaptationIndex/invitations

@Benjamin-Lee
Copy link
Owner

PS I'm fine dropping support for Python 2. It's EOL and not needed at all.

@BjornFJohansson
Copy link
Collaborator Author

Hi, I added a new branch called sharp with some changes:

  • versioning with setuptools_scm
  • an additional test based on the Sharp 1987 paper
  • GH workflow for testing
  • GH workflow for building a setuptools package (https://test.pypi.org/project/CAI/)
  • GH workflow and conda package
  • changed to a src layout to facilitate testing of installed files
  • restricted python to >=3.7 (same as biopython)

If you make me co-owner of the pypi repo, I can point the setuptools upload there instead of
testpypi. With this setup, making a new github release will automatically trigger builds.

@Benjamin-Lee
Copy link
Owner

Benjamin-Lee commented Nov 28, 2021

Awesome, let me work on that now

Scratch that. Since I got a new phone, my 2FA codes never transferred. I'll have to recharge the old phone to sign in but will get on it. Sorry!

@Benjamin-Lee
Copy link
Owner

Are we good to PR sharp into master?

@BjornFJohansson
Copy link
Collaborator Author

I think so, it passes all the tests and I have successfully installed the resulting setuptools package in a fresh environment on my machine.

@Benjamin-Lee
Copy link
Owner

Could you share your PyPI username? I tried to add BjornFJohansson but no luck

@BjornFJohansson
Copy link
Collaborator Author

This is me: https://pypi.org/user/bjorn

@crockeraw
Copy link

For me, pip install is still not working for this repo, even though it looks like there was a merge intended to fix this. I was able to install BjornFJohansson's branch "sharp", however. I did not dig any deeper into the issue, but used the following to install CAI:
pip install git+https://github.com/BjornFJohansson/CodonAdaptationIndex.git

@BjornFJohansson
Copy link
Collaborator Author

For me, pip install is still not working for this repo, even though it looks like there was a merge intended to fix this. I was able to install BjornFJohansson's branch "sharp", however. I did not dig any deeper into the issue, but used the following to install CAI: pip install git+https://github.com/BjornFJohansson/CodonAdaptationIndex.git

Hi, I think 2to3 is the culprit here. I simply removed it in the sharp branch.
I could try to make a new release, but right now I am pressed for time.

@BjornFJohansson
Copy link
Collaborator Author

@crockeraw did you solve your problem? You could install the sharp branch using pip/git.

@SouradiptoC
Copy link

SouradiptoC commented Feb 24, 2023

Hi @BjornFJohansson, I had been building a python package for analyzing codon usage. While building with readthedocs I get the following error

Collecting CAI~=1.0.3
Downloading CAI-1.0.3.tar.gz (6.0 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
error in CAI setup command: use_2to3 is invalid.
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Please look into it

@BjornFJohansson
Copy link
Collaborator Author

@SouradiptoC

Please use cai2: https://pypi.org/project/cai2/

@YouCook21
Copy link

@BjornFJohansson would it be possible to distribute cai2 as a conda package and further install as conda install cai2 ?

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

5 participants