Comments (19)
I realized what was the problem now. For anyone to whom it may be helpful:
I installed using --user option in pip to avoid using sudo. This didn't install properly, but showed no error messages. To fix it simply uninstall and then install again using sudo.
from snakeviz.
More recent PRs have added the ability to call SnakeViz via python -m snakeviz name_of_profile
, which won't depend on the snakeviz executable being available.
from snakeviz.
I installed using --user option in pip to avoid using sudo. This didn't install properly, but showed no error messages. To fix it simply uninstall and then install again using sudo.
That sounds like an issue with your configuration (and in general "install using sudo" is poor advice). You didn't mention what OS you're using, but pip install --user
typically installs into $HOME/.local
, and the snakeviz
executable will be in $HOME/.local/bin/snakeviz
, so you need to make sure that $HOME/.local/bin
is on your $PATH
if you want to use pip install --user
. This is true in general for Python packages and is in no way particular to snakeviz.
from snakeviz.
On MacOS, please check /Users/USER_NAME/Library/Python/PY_VERSION/bin
and add this path to $PATH
from snakeviz.
Closing since this is not likely an issue with snakeviz (though it does remind me that we need to replace distribute_setup.py with ez_setup.py).
But feel free to keep posting in this issue so that we can resolve this. First of all, what commands did you run to install snakeviz? Are you able to provide the output that was produced by that command?
from snakeviz.
Sure. I used easy_install to do it. Here's my output:
$ sudo easy_install snakeviz
Searching for snakeviz
Reading http://pypi.python.org/simple/snakeviz/
Best match: snakeviz 0.1.1
Downloading https://pypi.python.org/packages/source/s/snakeviz/snakeviz-0.1.1.tar.gz#md5=d1a2ae6bd9bea73270d4ca35ad798698
Processing snakeviz-0.1.1.tar.gz
Running snakeviz-0.1.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-8YGQk3/snakeviz-0.1.1/egg-dist-tmp-moq_T_
zip_safe flag not set; analyzing archive contents...
snakeviz.handler: module references file
snakeviz.main: module references file
Adding snakeviz 0.1.1 to easy-install.pth file
Installing snakeviz script to /Volumes/Macintosh HD/Users/Tom/bin
Installed /sw/lib/python2.7/site-packages/snakeviz-0.1.1-py2.7.egg
Processing dependencies for snakeviz
Finished processing dependencies for snakeviz
$ snakeviz helloworld.profile
-bash: snakeviz: command not found
When I enter the interpreter though:
$ python
Python 2.7.5 (default, Oct 30 2013, 21:56:17)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import snakeviz
dir(snakeviz)
['builtins', 'doc', 'file', 'name', 'package', 'path', 'version', 'version']
Does that help?
from snakeviz.
It does, thanks. I don't know anything about fink, but it appears that it thinks the appropriate place to install scripts to is /Volumes/Macintosh HD/Users/Tom/bin
. You need to make sure that path is on your PATH
environment variable.
from snakeviz.
Oh good point. That's funny. That's unlikely to be caused by fink though. It's odd to me that it attempts to install it in my home directory/bin, especially since that directory doesn't exist, nor have I ever seen a program attempt to install it there.
Is there a way to tell it to install it somewhere else? If not I can just edit my path.
from snakeviz.
I'm not sure. Is the /sw/lib/
path a fink thing?
from snakeviz.
Yes, /sw/ is where fink stores everything.
Does snakeviz require the Apple installed python? I attempted to run snakeviz now that I know where it is and it resulted in a segmentation fault. I think it's conflicting python versions. Fink uses its own version of python and that was actually why I couldn't use RunSnakeRun, because wxPython doesn't like the fink version of python.
from snakeviz.
No, definitely not. Never used the Python from Apple. It's not meant to be used for anything not specific to OSX ;)
Hopefully @jiffyclub can get in on this later since he uses a Mac and I don't. Since snakeviz itself is pure python it's more likely your installation of Tornado (the web server) is screwed up :/
from snakeviz.
Oh okay. Maybe I'll try and mess with the Tornado install then and see if I can patch things up on my end.
Thanks.
from snakeviz.
I don't know why that directory is being chosen for the script destination. I haven't used fink in many, many years. But it would be interesting to see whether snakeviz works if you add the script destination directory to your PATH.
from snakeviz.
Why is this issue closed? How is this not a bug?
It's late 2016 now and I just installed using pip and I see the same problem. It is at least a bug in the documentation that says "install with pip, then run snakeviz". It doesn't work that way.
from snakeviz.
I have same issue with MacOS. I installed using pip but then snakeviz cannot be executed from terminal. And under my $HOME/.local/ there is no folder "bin".
from snakeviz.
I can't agree more, you are right!
from snakeviz.
On MacOS with .pyenv, you may have to restart a new shell session for the bin to be seen. FYI.
from snakeviz.
I realized what was the problem now. For anyone to whom it may be helpful:
I installed using --user option in pip to avoid using sudo. This didn't install properly, but showed no error messages. To fix it simply uninstall and then install again using sudo.
You saved my day!
from snakeviz.
More recent PRs have added the ability to call SnakeViz via
python -m snakeviz name_of_profile
, which won't depend on the snakeviz executable being available.
Thanks, this did it for me.
from snakeviz.
Related Issues (20)
- charts not adding up HOT 1
- requested an insecure frame HOT 1
- Can I use SnakeViz in Google Colab? HOT 1
- %snakeviz magic lumps everything under builtins.exec HOT 2
- Snakeviz over an ssh-forwarded Jupyter-lab server connection?
- TypeError: 'int' object is not iterable
- How reset sorting? HOT 1
- Profile accuracy HOT 1
- Chart load error
- add info for trending
- chart time problem HOT 1
- Error "not a valid profile" on python 3.8.9 HOT 1
- a question about show message info HOT 2
- Option to write output to html file HOT 1
- An error occurred processing your profile. You can try a lower depth, a larger cutoff, or try profiling a smaller portion of your code. If you continue to have problems you can contact us on GitHub. HOT 1
- Drop support for EOL Pythons HOT 9
- Snakeviz not showing visualization via online jupyterLab HOT 4
- subprocesses HOT 2
- miniconda3 python3.12.1 on Win10 , snakeviz fails to start HOT 2
- Threading breaks SnakeViz Visualisation (Python 3.12.3) HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snakeviz.