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

Cannot install nxviz on anaconda #553

Closed
PyMap opened this issue May 12, 2019 · 9 comments
Closed

Cannot install nxviz on anaconda #553

PyMap opened this issue May 12, 2019 · 9 comments

Comments

@PyMap
Copy link

PyMap commented May 12, 2019

Hi Eric. I´m having the same issue as @hansenzoe! . I´m trying to install nxviz with python 3.6 on jupyter notebook (Windows 10). This is a virtual environment (the root is python 2.7). Using "!pip install nxviz" on jupyter I get the following error:

ERROR: Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

When I try with "! conda install nxviz" or "! conda install -c conda-forge nxviz" (from notebook or the anaconda prompt of the virtual environment) the instalation process never ends.

Do you any idea?

Thanks!

Originally posted by @PyMap in #361 (comment)

@PyMap PyMap changed the title Hi Eric. I´m having the same issue as @hansenzoe! . I´m trying to install nxviz with python 3.6 on jupyter notebook (Windows 10). This is a virtual environment (the root is python 2.7). Using "!pip install nxviz" on jupyter I get the following error: Cannot install nxviz on anaconda May 12, 2019
@ericmjl
Copy link
Owner

ericmjl commented May 12, 2019

hi @PyMap, I'm not sure how to debug the pip installation, as I think there's some context I'm missing (and I usually don't use pip anyways). If you're working out of a virtual environment, then I'm not sure why you'd have an uninstallation of pyyaml, though?

As for installation through conda - It's definitely not recommended practice to conda install a package in a notebook. Now, if the conda installation process never ends in the anaconda prompt, that's probably because the solver is taking a while.

Perhaps destroying your current virtual env and recreating it could help?

I'm sorry I can't offer more help here. I'm quite unfamiliar with Windows (the only OS where the Anaconda prompt is relevant), as I've been a macOS + Linux user exclusively since 2006.

@PyMap
Copy link
Author

PyMap commented May 12, 2019

Eric, thanks for your answer! The problem should be associated with the environment. I solved it but don't really know how. I've installed nxviz using "conda install nxviz" on root anaconda prompt and then imported it first on jupyter root (python 2.7). After that, I also imported it on python 3.6 virtual environment and it works. Don't really know what happened (I didn't do anything different than before).

@PyMap
Copy link
Author

PyMap commented May 12, 2019

I was wrong. It doesn't work. I can import it on root environment but not in the virtual one.

@ericmjl
Copy link
Owner

ericmjl commented May 12, 2019

@PyMap one thing you'll have to do is ensure that Jupyter can recognize your environment's Python interpreter. The commands are listed below; don't copy the $!

$ conda activate <your_env_name>  # or source activate <your_env_name>
$ python -m ipykernel install --user --name <your_env_name>

Now, in Jupyter, you will see your environment kernel. Ensure that your environment is activated and then conda install nxviz. Then you can import.

I'm a bit tied for time right now, as I have other contexts to handle, so I'm going to leave it here for a bit. Do ping back if other issues show up.

I would also encourage you to post an issue on the Jupyter repository with this installation bonanza 😄. After Jupyter moved to not automatically identifying conda environment Python kernels, I've had to debug more environment issues than nxviz issues, and they all follow the same theme: "I installed nxviz, but it doesn't import! Turns out Jupyter needs to know which Python kernel I'm using, and that means I need to install the kernel first, and then ensure that I'm in the right environment before I install nxviz..." I'm just as frustrated as you are having to debug this, except it's repetitive debugging over and over on my side.

@ericmjl
Copy link
Owner

ericmjl commented May 12, 2019

For sanity, I'm going to close this issue. Feel free to post back if things still don't work.

@ericmjl ericmjl closed this as completed May 12, 2019
@PyMap
Copy link
Author

PyMap commented May 12, 2019

Eric, thanks for your help. I think I won't continue for the moment. I tried with

python -m ipykernel install --user --name <your_env_name>

it doesn't launch my jupyter but doesn't give back any error.

When use conda install, the "never ends" installation process start and stop here:
image

If I have any news I ping you. Thanks again!

@ericmjl
Copy link
Owner

ericmjl commented May 12, 2019

it doesn't launch my jupyter but doesn't give back any error.

Sorry, with this command:

$ python -m ipykernel install --user --name <your_env_name>

you have to replace <your_env_name> with the name of your environment.

That command only installs the kernel as a kernel that Jupyter can recognize.

The pre-requisite to the above command is:

$ conda activate <your_env_name>

Taken together:

$ conda activate <your_env_name>  # replace with your environment name.
$ python -m ipykernel install --user --name <your_env_name>
$ conda install -c conda-forge nxviz
$ jupyter lab  # (or jupyter notebook)

That's the correct order of commands to run.

@PyMap
Copy link
Author

PyMap commented May 13, 2019

Thanks again Eric! That's exactly what I did but when I use "conda install" or "conda-forge" the installation process seems to get stucked on the following line:

conda-forge/win-64::wordcloud==1.4.1=py36_0

image

I have created another virtual environment with python 3.6 and this seems to work, but still looks rare.

I will keep trying.

Thanks again for your help!

@ericmjl
Copy link
Owner

ericmjl commented May 13, 2019

OK, got it. This looks like a conda issue, and I would encourage you to post this "stuck installation" issue on the conda repo: https://github.com/conda/conda/issues. My best guess here is that the dependency solver is stuck somewhere.

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

2 participants