Can't install networkx for python 3.4

旧街凉风 提交于 2020-01-25 11:52:08

问题


After 3 days of trying to install networkx for python 3.4, I am on the verge of giving up and I've decided to seek for help from some of you people who had some experience with this perhaps.

I managed to install networkx with easy_install or pip_install (I don't even remember anymore of how many times I've tried to install it all), but when I try to compile the very first, most basic piece of code (found in a tutorial):

import networkx as nx;

Test = nx.Graph();
Test.add_node("Test");
nx.draw(Test, node_size=900, node_color="blue");

I get an error: ImportError: No module named 'numpy' When I try to install numpy with easy_install numpy it starts the download and installation process normally but then it shows this error: Microsoft Visual C++ 10 is required

Is this referred to MV C++ 1- redistributable? I've downloaded it and tried to install it but it shouts out an error that I already have a newer version of it so I don't need it...

So my questions would be: 1.Can networkx module be installed for python 3.4 at all? 2.If so, do I need anything else besides networkx zip/installer and python 3.4 for it to work? (I've literally found 4 sources that all claim different requirement information about networkx!)

I would really appreciate any help, as I feel completely lost and discouraged about any further use of python.


回答1:


You didn't say which operating system you are using but by referencing Microsoft Visual C++ I'm going to say Windows. In that case the simplest way to get a functioning scientific Python computing environment is to install one of the packaged distributions. Two good choices are Anaconda https://store.continuum.io/cshop/anaconda/ and Enthought Canopy https://www.enthought.com/products/canopy/

NetworkX definitely works with Python3.4 https://travis-ci.org/networkx/networkx



来源:https://stackoverflow.com/questions/29438968/cant-install-networkx-for-python-3-4

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!