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

Not able to install adlfs through pip #28

Closed
sebastianpantin opened this issue Dec 16, 2019 · 12 comments
Closed

Not able to install adlfs through pip #28

sebastianpantin opened this issue Dec 16, 2019 · 12 comments

Comments

@sebastianpantin
Copy link

When trying to install the newest version of adlfs with pip I get the following error:

Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\SEBAST~1\AppData\Local\Temp\pip-install-30y0kaw9\adlfs\setup.py", line 5, in <module> import versioneer ModuleNotFoundError: No module named 'versioneer' ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

pip version: 19.3.1
python version: 3.7

@sebastianpantin
Copy link
Author

It seems like the import in the setup.py file doesn't recognize the versioneer.py file.

@hayesgb
Copy link
Collaborator

hayesgb commented Dec 16, 2019 via email

@martindurant
Copy link
Member

You should not normally need versioneer in your environment - only the person creating the package needs it. Versioneer is self-contained in the massive file that gets added to the repo. Perhaps it is missing in MANIFEST?

@sebastianpantin
Copy link
Author

@hayesgb

  1. Yes, I am working in a conda env.
  2. Windows10 but the issue also appears on Ubuntu 16 (tested locally and in azure pipelines)
  3. No. Then it complains about the get_version() call in setup.py and as @martindurant says, I shouldn't need it right?

I just verified it installs with pip into a fresh conda environment on Python 3.7. A few questions: 1) Are you working in a conda environment? If not, are you using pipenv? 2) What OS are you working on? 3) If you pip install versioneer into your environment, can you then pip install adlfs? Thanks, Greg

On Dec 16, 2019, at 6:20 AM, Sebastian Liljevall @.***> wrote: It seems like the import in the setup.py file doesn't recognize the versioneer.py file. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#28?email_source=notifications&email_token=ADADBNQ72AM5AVSNE5HSYCLQY5XCPA5CNFSM4J3I3AYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEG6Q5PY#issuecomment-566038207>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADADBNTCCVQHLDRD6LXU45LQY5XCPANCNFSM4J3I3AYA.

@hayesgb
Copy link
Collaborator

hayesgb commented Dec 16, 2019

Agree, it shouldn't be needed.

My install is using the following in a clean conda environment:
conda == 4.7.12
pip == 19.3.1
Python = 3.7.3
MacOS

A similar error with versioneer was reported here earlier this year, which was attributed to pip and possibly PEP517. Here they recommend installing with pip install --no-use-517 pandas.

Can you try that with adlfs?

@sebastianpantin
Copy link
Author

Tested, still the same error: "No module named 'versioneer'"

@hayesgb
Copy link
Collaborator

hayesgb commented Dec 16, 2019

@martindurant -- Any chance you can replicate? I'm not having any luck. It also runs passes the tests in Azure Pipelines.

@sebastianpantin - Can you verify your conda version?

@alexis-mignon
Copy link

Hello,

Same issue on Ubuntu 18.04 in a virtual env

  • python 3.6.9
  • pip 19.3.1
$ pip install adlfs

Collecting adlfs
  Using cached https://files.pythonhosted.org/packages/a5/ae/9251819f30a0b28912bb9589305bf3cbd549487b98d277858049ea1be702/adlfs-0.1.4.tar.gz
    ERROR: Command errored out with exit status 1:
     command: /home/alexis/Documents/Projets/Sandbox/DaskAzurite/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-g6lmykoy/adlfs/setup.py'"'"'; __file__='"'"'/tmp/pip-install-g6lmykoy/adlfs/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-g6lmykoy/adlfs/pip-egg-info
         cwd: /tmp/pip-install-g6lmykoy/adlfs/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-g6lmykoy/adlfs/setup.py", line 5, in <module>
        import versioneer
    ModuleNotFoundError: No module named 'versioneer'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Tried to install versioneer

pip install versioneer

but then got:

Collecting adlfs
  Using cached https://files.pythonhosted.org/packages/a5/ae/9251819f30a0b28912bb9589305bf3cbd549487b98d277858049ea1be702/adlfs-0.1.4.tar.gz
    ERROR: Command errored out with exit status 1:
     command: /home/alexis/Documents/Projets/Sandbox/DaskAzurite/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8lto2ljt/adlfs/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8lto2ljt/adlfs/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-8lto2ljt/adlfs/pip-egg-info
         cwd: /tmp/pip-install-8lto2ljt/adlfs/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-8lto2ljt/adlfs/setup.py", line 10, in <module>
        version=versioneer.get_version(),
    AttributeError: module 'versioneer' has no attribute 'get_version'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Installing from the git repository worked:

python setup.py install

@martindurant
Copy link
Member

Indeed, the 0.1.4 tar-gz package does not include versioneer.py in the root as it should (only has _version.py within the inner python package). I suggest there should be an explicit MANIFEST file, or that it should otherwise be specified by the setup.py script.

@alexis-mignon
Copy link

alexis-mignon commented Dec 16, 2019

I don't really know versioneer but it just looks like a misuse of it.

I just followed the Quick Install instructions from versioneer github (the [versioneer] section being already there)

If after installing versioneer and applying

$ pip install versioneer
$ versioneer install

in the project directory. If I then build the packages

$python setup.py sdist bdist_wheel

The generated packages install without any problem even in an environment not having versioneer.

So maybe the person who generated the package forgot to install versioneer ?

@martindurant
Copy link
Member

Yes, that's how it's supposed to work

@hayesgb
Copy link
Collaborator

hayesgb commented Dec 17, 2019

@martindurant, @alexis-mignon -- Thanks. I just pushed v0.1.5 to pypi, and verified that versioneer.py is in the tarball file. Not sure how I was able to successfully install from pypi on my machine, but a watch-out for the future.

@hayesgb hayesgb closed this as completed Dec 17, 2019
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

4 participants