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

Requirements do not properly install #21

Closed
mikeyshulman opened this issue Aug 6, 2018 · 6 comments
Closed

Requirements do not properly install #21

mikeyshulman opened this issue Aug 6, 2018 · 6 comments
Assignees
Labels

Comments

@mikeyshulman
Copy link

clean install in a virtual environment does not install requirements.

pip 18.0    
Python 3.6.3    

➜  virtualenv -p python3 foo; source foo/bin/activate; pip3 install pymagnitude                                         
In [1]: from pymagnitude import Magnitude                           
---------------------------------------------------------------------------                                                             
ModuleNotFoundError                       Traceback (most recent call last)                                                             
<ipython-input-1-a4fc6d35defa> in <module>()                        
----> 1 from pymagnitude import Magnitude                           

/tmp/foo/lib/python3.6/site-packages/pymagnitude/__init__.py in <module>()                                                              
     11 import hashlib                                              
     12 import heapq                                                
---> 13 import lz4.frame                                            
     14 import math                                                 
     15 import operator                                             

ModuleNotFoundError: No module named 'lz4'                          
@AjayP13
Copy link
Contributor

AjayP13 commented Aug 6, 2018

Hi,

Thanks for reporting. I just tested it in a fresh docker container ('python:latest' which uses Python 3.6.5 and pip 18.0. I created a virtualenv, activated it, and installed it and it seemed to work fine.

This might be an issue with your particular environment. The installation does require compiling some native code for its dependencies which might be where things are going wrong. As a note, we try to avoid this whenever possible. When I built the installation, I created eggs (which contain pre-compiled objects for all of the native code) for all the major platforms (32/64-bit macOS, Linux, and 64-bit Windows) for pymagnitude. Unfortunately, Python eggs don't recursively pre-compile dependencies of the main project (like lz4) that have native code. So I also created a custom install step that creates eggs for all the dependencies so that no compiler would be necessary on all the major platforms.

When any egg installation fails or you are not on a major platform (32/64-bit macOS, Linux, and 64-bit Windows), it falls back to trying to compile the dependencies on your local computer using whatever C/C++ compiler you have. If you don't have a C/C++ compiler available on your machine it can cause issues.

The following information would be helpful to debug:

OS: ??
OS Version: ??
CPU: (Intel or ARM? 32-bit or 64-bit?)

And please re-run the installation in a new, fresh virtualenv with the command pip3 install pymagnitude -vvvv and paste the resulting log.

@AjayP13 AjayP13 self-assigned this Aug 6, 2018
@mikeyshulman
Copy link
Author

Distributor ID: Ubuntu            
Description:    Ubuntu 17.10      
Release:        17.10             
Codename:       artful

I started looking at setup.py, but the logic was a little hard to follow. If it helps, forcing pip to use --no-binary :all: fixes the problem, which means that somehow requirements.txt is maybe not getting picked up?

@mikeyshulman
Copy link
Author

And sorry, its a 64 bit intel CPU

@AjayP13
Copy link
Contributor

AjayP13 commented Aug 7, 2018

Hm, glad you got it working. Can you run the failing install with the command pip3 install pymagnitude -vvvv and paste the resulting log here. That should print the output of setup.py in verbose mode and show what is failing hopefully. Would be helpful to figure this out for future users who might run into this issue.

@mikeyshulman
Copy link
Author

I can no longer reproduce the issue, even after blowing away my wheel cache. Sorry.
I'm going to close the issue.

@AFAgarap
Copy link

@AjayP13 The problem persists. I'm trying to install pymagnitude from cache in GitHub Actions, and it's failing to install the dependencies.

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

No branches or pull requests

3 participants