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

Can't install using pip #19

Closed
2ar0n opened this issue Oct 31, 2018 · 11 comments
Closed

Can't install using pip #19

2ar0n opened this issue Oct 31, 2018 · 11 comments

Comments

@2ar0n
Copy link

2ar0n commented Oct 31, 2018

When trying to install pymap3d on a fresh Ubuntu 16.04 installation using pip3, the following error is returned:

$ pip3 install pymap3d
Collecting pymap3d
Installing collected packages: pymap3d
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 335, in run
    prefix=options.prefix_path,
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 732, in install
    **kwargs
  File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 837, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 1039, in move_wheel_files
    isolated=self.isolated,
  File "/usr/lib/python3/dist-packages/pip/wheel.py", line 346, in move_wheel_files
    assert info_dir, "%s .dist-info directory not found" % req
AssertionError: pymap3d .dist-info directory not found

I also got the same error on another system using Mint 17.3.
Any ideas ?
Cheers,

@scivision
Copy link
Member

scivision commented Oct 31, 2018

Hi @2ar0n
that's interesting; Ubuntu 16.04 comes with Python 3.5 by default, which is supposed to work with pymap3d.
This post experienced exactly the same error on a different package, and a commenter said it might work fine regardless of the error.
It seems like it could be a rare issue. Another commenter said it was fixed by reinstalling Python (with something like Miniconda.

I installed a fresh Miniconda Python 3.5 environment and Pymap3D installed without any issues.
You might consider trying the 50MB Miniconda download for Python 3, in general it's nice to avoid using system Python in case issues arise.

@2ar0n
Copy link
Author

2ar0n commented Nov 1, 2018

Hello @scivision,
I've looked a bit more into the problem and you're right that I seems not the be related to the pymap3d package itself, so I will close this issue.
Nonetheless, I've tried installing it on 4 different machines now (all running Python3.5 on Ubuntu 16.04) and was successful on only one of them. What did work for me was installing from source using pip3 install -e . in the clone repository. Hope this can be useful to anybody.

@2ar0n 2ar0n closed this as completed Nov 1, 2018
@scivision
Copy link
Member

scivision commented Nov 1, 2018

Hmm, this may have been an issue with too-old pip as would be typical with system Python.
Many projects these days require pip >= 10. Older versions of pip that come with Linux may just fail with weird messages like this.

@2ar0n
Copy link
Author

2ar0n commented Nov 1, 2018

I expected that too, but the same error came using pip 18.1. I'll double check

@scivision
Copy link
Member

scivision commented Nov 1, 2018

Here's what I got from Ubuntu 16.04, system Python 3.5.2 and pip==8.1.1:

python3 -m pip install --user pymap3d

errors:

 Running setup.py bdist_wheel for unknown ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-eevn2f5r/unknown/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpibs2lyeupip-wheel- --python-tag cp35:
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/usr/lib/python3.5/tokenize.py", line 454, in open
      buffer = _builtin_open(filename, 'rb')
  FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-build-eevn2f5r/unknown/setup.py'
  
  ----------------------------------------
  Failed building wheel for unknown
  Running setup.py clean for unknown
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-eevn2f5r/unknown/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" clean --all:
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/usr/lib/python3.5/tokenize.py", line 454, in open
      buffer = _builtin_open(filename, 'rb')
  FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-build-eevn2f5r/unknown/setup.py'
  
  ----------------------------------------
  Failed cleaning build dir for unknown
Successfully built unknown
Failed to build unknown
Installing collected packages: unknown
Successfully installed unknown
You are using pip version 8.1.1, however version 18.1 is available.

Ubuntu 16.04, system Python 3.5.2, pip==18.1

python3 -m pip install --user pymap3d

error:

python3 -m pip install --user pymap3d
Collecting pymap3d
Installing collected packages: pymap3d
Exception:
Traceback (most recent call last):
  File "/home/.local/lib/python3.5/site-packages/pip/_internal/cli/base_command.py", line 143, in main
    status = self.run(options, args)
  File "/home/.local/lib/python3.5/site-packages/pip/_internal/commands/install.py", line 366, in run
    use_user_site=options.use_user_site,
  File "/home/.local/lib/python3.5/site-packages/pip/_internal/req/__init__.py", line 49, in install_given_reqs
    **kwargs
  File "/home/.local/lib/python3.5/site-packages/pip/_internal/req/req_install.py", line 760, in install
    use_user_site=use_user_site, pycompile=pycompile,
  File "/home/.local/lib/python3.5/site-packages/pip/_internal/req/req_install.py", line 382, in move_wheel_files
    warn_script_location=warn_script_location,
  File "/home/.local/lib/python3.5/site-packages/pip/_internal/wheel.py", line 326, in move_wheel_files
    assert info_dir, "%s .dist-info directory not found" % req
AssertionError: pymap3d .dist-info directory not found

@scivision
Copy link
Member

Ubuntu 18.04, system Python 3.6.6 and pip==9.0.1

/usr/bin/python3 -m pip install --user pymap3d

is successful

@scivision
Copy link
Member

scivision commented Nov 1, 2018

So I am not sure what the issue is with Ubuntu 16.04 and system Python. Generally we advocate not using system Python, but rather a user-installed small Python distro like Miniconda, which does work for me with Python 3.5, 3.6, 3.7

@2ar0n
Copy link
Author

2ar0n commented Nov 2, 2018

I'll keep that in mind! Thank you for all the investigation

@scivision
Copy link
Member

Yes sorry I don't have time right now to dig into it further. It could be that since Ubuntu 16.04 doesn't have the latest 3.5.x version, there could have been some bugfix that even having the latest pip doesn't help. This is a good thing to note for other developers, as this issue barely shows up on a Google search.

@rdfred
Copy link

rdfred commented Jun 29, 2019

Just another datapoint. The pip install appears to work for me if you specify an older version (this is on ubuntu 16.04 with python 2). It appears that anything below the current 1.8.0 will properly install (in both the "OS" version of pip and in virtualenv's).

@scivision
Copy link
Member

I believe this may be fixed now. I tried with same systems and it works e.g.

pip install pymap3d

As well as git clone and then

pip install -e .

I recently added more testing and configuration to hopefully fix this issue.

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

3 participants