python怎么安装networkx,无法为python 3.4安装networkx

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.

解决方案

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值