question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NumPy dependency is lacking in the requirements.txt

See original GitHub issue

Hey, Marco!

First of all, great work! vedo is amazing and it eases the pain to use VTK. Thanks!

I’m opening this issue due to a very minor problem I have faced. I tried vedo from CLI and it complained of:

ModuleNotFoundError: No module named 'numpy'

Since you mentioned in the README.md that vedo is based on VTK and numpy, maybe including numpy as a requirement would make sense. What do you think? Could I submit a PR?

Cheers! Diego

Steps to reproduce the problem

Below I described exactly what I did to make it reproducible if you want to check (or vedo interested users):

OS: Ubunutu 18.04.4

Procedures: I installed vedo in the development mode. It means that I cloned your repo and executed in an isolated env:

$ virtualenv .vedo
$ source .vedo/bin/activate
$ pip install -r requirements.txt
$ python setup.py install

Then I ran vedo with its command-line interface:

$ vedo pore_network.vtu

The .vtu file is attached here.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
marcomusycommented, Jul 2, 2020

Hi Diego, thanks a lot for drawing my attention to this and for the explainations! i just made a quick check (hope it makes sense) by adding the numpy in the install_requires then doing pip install . -U did not mess up with the conda environment… so I suggest we add it in the setup.py only!

1reaction
volpattocommented, Jul 2, 2020

I’m not sure if ‘numpy’ has to be added in the setup.py only or also in the requirements.txt

Hmm… this is a good question. As pointed by PyPA, install_requires should contain only the very essential dependencies, while requirements.txt can be more extensive, maybe when some dependency is useful for a subset of use cases. In my understanding (please correct me if I’m wrong), numpy is essential for vedo, since it can compromise a big feature of vedo (CLI usage). So, in this case, I think that it would be appropriate to include numpy in both. Well, in either way, vedo would have only 2 dependencies, it’s still tidy and clean. Are you OK with that? Please feel free to disagree 😃

(some time ago i remember that trying to do pip -U also updated the conda’s numpy version which was unintended… but i’m not expert of pip!)

Hmm! Yes, if you have conda’s python activated, and then run pip -U, it probably will mess with Python packages inside the conda env. But, IMHO, this is OK. Actually I think that to mix conda and pip to manage packages can be a source of problems (oh, boy… I have faced hard times, I don’t recommend it), this is a not recommended practice AFAIK. Better choose only one and stick together with it until the end 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dependency to numpy cannot be resolved when installing ...
My azure function is using python module pywavelets which requires dependency to numpy . Here is my requirements.txt
Read more >
Why requirements.txt isn't enough - model.predict
Create a requirements.in file and list just the direct dependencies of your app. The same way you'd do with requirements.txt in Scenario #1....
Read more >
User Guide - pip documentation v22.3.1
It's important to be clear that pip determines package dependencies using install_requires metadata, not by discovering requirements.txt files embedded in ...
Read more >
Python Dependencies via Pip - Heroku Dev Center
To specify Python package dependencies on Heroku via pip, add a pip requirements file named requirements.txt to the root of your repository.
Read more >
Pip constraints files - Blog | luminousmen
Now we can keep everything clean — just list direct dependencies in requirements.txt or setup.py , without the exact versions, and keep the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found