Comments (4)
*nxviz version: 0.6.0
*python version: 3.7
*operating system: windows 10
Description
I want to import nxviz as nx into my jupyter lab notebook. (Standalone jupyter notebook, no anaconda).
When I install new packages, I open command prompt as admin, then
pip install nxviz
This didn't work easily. I then tried variations of
python -m pip install nxviz
and then
pip install --user nxviz
Finally, it appears to work, but I still cannot import the package into jupyter or python console.
Now- this is the output I get
>python -m pip install nxviz
Requirement already satisfied: nxviz in c:\users\nicole wheatley\appdata\roaming\python\python37\site-packages (0.6.0)
Requirement already satisfied: hypothesis==3.82.1 in c:\program files\python37\lib\site-packages (from nxviz) (3.82.1)
Requirement already satisfied: numpy==1.15.4 in c:\program files\python37\lib\site-packages (from nxviz) (1.15.4)
Requirement already satisfied: sphinxcontrib-fulltoc==1.2.0 in c:\program files\python37\lib\site-packages (from nxviz) (1.2.0)
Requirement already satisfied: networkx==2.2 in c:\program files\python37\lib\site-packages (from nxviz) (2.2)
Requirement already satisfied: PyYAML==3.13 in c:\program files\python37\lib\site-packages (from nxviz) (3.13)
Requirement already satisfied: seaborn==0.9.0 in c:\program files\python37\lib\site-packages (from nxviz) (0.9.0)
Requirement already satisfied: cryptography==2.4.1 in c:\program files\python37\lib\site-packages (from nxviz) (2.4.1)
Requirement already satisfied: matplotlib==3.0.2 in c:\users\nicole wheatley\appdata\roaming\python\python37\site-packages (from nxviz) (3.0.2)
Requirement already satisfied: more-itertools==4.3.0 in c:\program files\python37\lib\site-packages (from nxviz) (4.3.0)
Requirement already satisfied: pandas==0.23.4 in c:\program files\python37\lib\site-packages (from nxviz) (0.23.4)
Requirement already satisfied: setuptools==40.6.2 in c:\program files\python37\lib\site-packages (from nxviz) (40.6.2)
Requirement already satisfied: palettable==3.1.1 in c:\program files\python37\lib\site-packages (from nxviz) (3.1.1)
Requirement already satisfied: pytest==4.0.0 in c:\program files\python37\lib\site-packages (from nxviz) (4.0.0)
Requirement already satisfied: attrs>=16.0.0 in c:\program files\python37\lib\site-packages (from hypothesis==3.82.1->nxviz) (18.2.0)
Requirement already satisfied: decorator>=4.3.0 in c:\program files\python37\lib\site-packages (from networkx==2.2->nxviz) (4.3.2)
Requirement already satisfied: scipy>=0.14.0 in c:\program files\python37\lib\site-packages (from seaborn==0.9.0->nxviz) (1.2.1)
Requirement already satisfied: cffi!=1.11.3,>=1.7 in c:\program files\python37\lib\site-packages (from cryptography==2.4.1->nxviz) (1.12.2)
Requirement already satisfied: six>=1.4.1 in c:\program files\python37\lib\site-packages (from cryptography==2.4.1->nxviz) (1.12.0)
Requirement already satisfied: idna>=2.1 in c:\program files\python37\lib\site-packages (from cryptography==2.4.1->nxviz) (2.8)
Requirement already satisfied: asn1crypto>=0.21.0 in c:\program files\python37\lib\site-packages (from cryptography==2.4.1->nxviz) (0.24.0)
Requirement already satisfied: cycler>=0.10 in c:\program files\python37\lib\site-packages (from matplotlib==3.0.2->nxviz) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\program files\python37\lib\site-packages (from matplotlib==3.0.2->nxviz) (1.0.1)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\program files\python37\lib\site-packages (from matplotlib==3.0.2->nxviz) (2.3.1)
Requirement already satisfied: python-dateutil>=2.1 in c:\program files\python37\lib\site-packages (from matplotlib==3.0.2->nxviz) (2.8.0)
Requirement already satisfied: pytz>=2011k in c:\program files\python37\lib\site-packages (from pandas==0.23.4->nxviz) (2018.9)
Requirement already satisfied: py>=1.5.0 in c:\program files\python37\lib\site-packages (from pytest==4.0.0->nxviz) (1.8.0)
Requirement already satisfied: colorama; sys_platform == "win32" in c:\program files\python37\lib\site-packages (from pytest==4.0.0->nxviz) (0.4.1)
Requirement already satisfied: pluggy>=0.7 in c:\program files\python37\lib\site-packages (from pytest==4.0.0->nxviz) (0.9.0)
Requirement already satisfied: atomicwrites>=1.0 in c:\program files\python37\lib\site-packages (from pytest==4.0.0->nxviz) (1.3.0)
Requirement already satisfied: pycparser in c:\program files\python37\lib\site-packages (from cffi!=1.11.3,>=1.7->cryptography==2.4.1->nxviz) (2.19)
Since it seemed to be installed, I tried importing nxviz into jupyter, but error says no such module
import nxviz as nv
ModuleNotFoundError: No module named 'nxviz'
Is module saved in the correct folder? Why is it in appdata/roaming? and not in normal Python37/Lib ?
Do you know what the error could be?
from nxviz.
@nwheatle yes, this does look like an issue with the package being installed into the incorrect environment.
One thing that is important for Jupyter users is to ensure that the Python kernel from the environment is accessible by Jupyter. To do this:
activate my_env_name
python -m ipykernel install --user --name my_env_name
Naturally, replace my_env_name
with your environment name. Following that, select the appropriate kernel when you create a new Jupyter notebook.
The reason for this architectural design is because you, as a Jupyter user, may want to access both an R and Python kernel installed in the same conda environment, in which that conda environment serves as your data science environment. Hence, it makes no sense to assume that that only one compute kernel is associated with each environment. I learned this the hard way 😄.
Now, if the aforementioned command doesn't work, I would suggest going upstream to Jupyter for help on how to solve this issue, as this is not an issue pertaining to bugs in nxviz's codebase, but rather issues of discovery of Python kernels for Jupyter.
from nxviz.
Hi Eric,
thank you for responding to my issue.
Despite some online search, I cannot figure out the name of my_env_name. I do not use conda or anaconda. My kernel name in jupyter lab notebook is Python 3.
@JKDev on stackoverflow shows how to find an environment name from jupyter that is using conda environment, https://stackoverflow.com/questions/37085665/in-which-conda-environment-is-jupyter-executing , but I cannot see any env_name that is supposed to show up ~ unless the envname is '3'.
I am following along to your DataCamp course (it's good!). I try to apply the course material to my own computer on jupyter as I go - knowing how to install things, how computers work in general, import the data, etc, is part of the challenge for a biologist entering data science.
from nxviz.
@nwheatle got it. I would advise using an Anaconda installation of Python, as this would allow you to isolate different environments for different projects. On my old blog, you'll read about why this is important. The short story is that I got utterly confused with where things were getting installed back in my early days of Python, and then came to the realization that I had to properly think about isolated environments in order to not get confused.
Hope the DataCamp course is useful for you 😄. And welcome to the world of data science. There's lots of superpowers to learn!
from nxviz.
Related Issues (20)
- Is it possible to make arcplot directional? HOT 2
- Downgrading pandas, matplotlib, networkx packages when installing nxviz HOT 4
- Broken example in new API documentation
- version mismatch on packages distributed by conda and pypi HOT 3
- Not an issue but a veli easy question
- Having trouble re-creating graph HOT 1
- Feature Request: Edge direction by source or target node colors. HOT 6
- Feature Request: Node label layout for circus plot HOT 2
- Question regarding parameters when creating MatrixPlot or CircosPlot HOT 6
- Changing the default node colors in Circosplot
- 'LinearSegmentedColormap' object has no attribute 'colors' with divergent network edges HOT 1
- draw() thakes 0 positional arguments but 1 was given HOT 6
- Module nxviz has no attribute 'annotate'
- Annotate node_colormapping legend_kwargs are not applied
- Error importing and executing Circosplot. HOT 1
- Matrix Plot Overlay Bug
- Customize node size and colormap in circosplot
- how show the node_labels on nxviz version:0.7.4 HOT 2
- ImportError: cannot import name 'CircosPlot' from 'nxviz.plots HOT 1
- Documentation outdated? HOT 1
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 nxviz.