Adding Networkx Library in pycharm

1,860 views
Skip to first unread message

Abdul Rehman

unread,
Apr 18, 2019, 5:55:16 PM4/18/19
to networkx-discuss
Hello everyone.

I am a beginner in (python coding and Netowrkx). I am using pycharm for networkx. 

After watching some videos i successfully installed networkx library but still when i import nextworkx library it is not working properly.

The image file is attached to understanding the problem clearly. 

Could anyone please help me to get rid of this problem. 

Thanks in advance for kind help.

Note: I am a beginner so looking forward to some detailed guidance.

Best Regards.
snip.JPG

Cord Thomas

unread,
Apr 18, 2019, 6:14:05 PM4/18/19
to networkx...@googlegroups.com
I believe the most common cause of PyCharm and other IDEs (development software) not recognizing installed packages/libraries is you are likely using a different interpreter in PyCharm than you are from the command line.  If you used PIP or Conda to install networkx there is a good chance that PyCharm is using a different interpreter.

from the command line you could enter "which python" that would result in a path to the python binary
in Pycharm, open Preferences enter "Project Interpreter" in the search box and check the path presented in the right window.  

--
You received this message because you are subscribed to the Google Groups "networkx-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to networkx-discu...@googlegroups.com.
To post to this group, send email to networkx...@googlegroups.com.
Visit this group at https://groups.google.com/group/networkx-discuss.
For more options, visit https://groups.google.com/d/optout.

Abdul Rehman

unread,
Apr 19, 2019, 3:36:46 PM4/19/19
to networkx...@googlegroups.com
Thanks a lot Cord Thomas. I guess I had path problem or something else. I just uninstalled everything and installed again and then from the beginning I installed packages. Now it's working fine.
by the way thanks for the kind response.
--
Abdul Rehman   PhD Scholar, Connected Computing and media processing Lab.
photo Mobile: +82-10-2844-1122
Email: a.rehm...@gmail.com , a.rehm...@knu.ac.kr
Skype: muhammadsimaal
Website: http://ccmp.knu.ac.kr/home.html
Address: CCMP Lab,Building IT4, Room # 411-1 KNU,Daegu, South Korea

Julien Klaus

unread,
Apr 23, 2019, 6:35:44 AM4/23/19
to networkx...@googlegroups.com
I think PyCharm often is preconfigured to use a virtual environment for each individual project. When you found the python interpreter tab you have to add the librarys by hand (see the image) using the green plus.


Bildergebnis für pycharm add library

Am 19.04.19 um 00:13 schrieb Cord Thomas:
Reply all
Reply to author
Forward
0 new messages