Posts: 17
Threads: 5
Joined: Apr 2017
Hi,
When I want to install some pachakes, I have "ImportError: No module named 'ConfigParser'" error.
I use Python3.5 and used the below command to set it as a default python
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10 e.g. to install setuptools I have the bellow error:
[Image: ppk_s1.jpg][Image: u909_s2.jpg]
I have also get the same error when I am going to install build-essential and python-dev for python-igraph as I discussed in this link.
I installed ConfigParser but I have yet the same errors:
[Image: e7df_c1.jpg]
Posts: 8,156
Threads: 160
Joined: Sep 2016
May-20-2017, 06:29 AM
(This post was last modified: May-20-2017, 06:29 AM by buran.)
The ConfigParser module has been renamed to configparser in Python 3.
https://docs.python.org/2/library/configparser.html
Also it's build in and you don't need to install it from PyPi in Pythin 3.5.2. That is for those who want to backport the improved version in Py2 or pre py3.5 versions
Posts: 17
Threads: 5
Joined: Apr 2017
(May-20-2017, 06:29 AM)buran Wrote: The ConfigParser module has been renamed to configparser in Python 3.
https://docs.python.org/2/library/configparser.html
Also it's build in and you don't need to install it from PyPi in Pythin 3.5.2. That is for those who want to backport the improved version in Py2 or pre py3.5 versions thanks for your reply...I am sorry. I don't exactly understand what should I do to install build-essential, python-dev and python-igraph without that error?
Posts: 1,298
Threads: 38
Joined: Sep 2016
As buran pointed out about the configparser being a built in, so is "setuptools", so you don't need to install that either. As for python-dev, that is from your OS's repository. It you are on a Debian or Ubuntu systen, it is probably apt-get install python-dev . As for python-igraph, you should be able to do this: pip3 install-python-igraph . It's amazing what you can find when you read the docs http://igraph.org/python/ .
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Posts: 17
Threads: 5
Joined: Apr 2017
May-20-2017, 01:31 PM
(This post was last modified: May-20-2017, 01:39 PM by Bani.)
(May-20-2017, 12:54 PM)sparkz_alot Wrote: As buran pointed out about the configparser being a built in, so is "setuptools", so you don't need to install that either. As for python-dev, that is from your OS's repository. It you are on a Debian or Ubuntu systen, it is probably apt-get install python-dev . As for python-igraph, you should be able to do this: pip3 install-python-igraph . It's amazing what you can find when you read the docs http://igraph.org/python/ . I use xubuntu.
As I said, I have the same error when installing those packages. e.g. for "python-dev" I have the bellow error:
[Image: bidr_python-dev.jpg]
I also try it with python3-dev:
[Image: 87mg_python3-dev.jpg]
Posts: 687
Threads: 37
Joined: Sep 2016
May-21-2017, 08:09 PM
(This post was last modified: May-21-2017, 08:10 PM by Ofnuts.)
(May-20-2017, 05:35 AM)Bani Wrote: Hi,
When I want to install some pachakes, I have "ImportError: No module named 'ConfigParser'" error.
I use Python3.5 and used the below command to set it as a default python
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10 Extremely dangerous thing to do. Try this:
Output: find /usr -type f -executable -exec grep -Eo '#!.*python\w?' {} \; | sort | uniq -c
4 #! /usr/bin/env python
49 #!/usr/bin/env python
2 #!/usr/bin/env python2
9 #!/usr/bin/env python3
205 #! /usr/bin/python
86 #!/usr/bin/python
27 #! /usr/bin/python2
1 #!/usr/bin/python2
82 #! /usr/bin/python3
85 #!/usr/bin/python3
So, on my Linux, there are 293 Python scripts that are likely written for Python2 and that will suddenly be executed with Python3.
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Posts: 2,953
Threads: 48
Joined: Sep 2016
Hello!
The error is not for python-dev. It's the newest version in the repository. You can read it at the beginning of the output from the command.
Try to install pip python-igraph
Posts: 17
Threads: 5
Joined: Apr 2017
May-22-2017, 08:39 AM
(This post was last modified: May-22-2017, 08:46 AM by Bani.)
(May-21-2017, 08:09 PM)Ofnuts Wrote: (May-20-2017, 05:35 AM)Bani Wrote: Hi,
When I want to install some pachakes, I have "ImportError: No module named 'ConfigParser'" error.
I use Python3.5 and used the below command to set it as a default python
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10 Extremely dangerous thing to do. Try this:
Output: find /usr -type f -executable -exec grep -Eo '#!.*python\w?' {} \; | sort | uniq -c
4 #! /usr/bin/env python
49 #!/usr/bin/env python
2 #!/usr/bin/env python2
9 #!/usr/bin/env python3
205 #! /usr/bin/python
86 #!/usr/bin/python
27 #! /usr/bin/python2
1 #!/usr/bin/python2
82 #! /usr/bin/python3
85 #!/usr/bin/python3
So, on my Linux, there are 293 Python scripts that are likely written for Python2 and that will suddenly be executed with Python3.
thank you.
[Image: bxfe_capture2.jpg]
what should I do to solve this problem?
(May-22-2017, 04:35 AM)wavic Wrote: Hello!
The error is not for python-dev. It's the newest version in the repository. You can read it at the beginning of the output from the command.
Try to install pip python-igraph
I tried the command below but I have an error.
sudo pip3 install python-igraph
[Image: djom_1.jpg]
Posts: 8,156
Threads: 160
Joined: Sep 2016
Please, stop post screenshots. copy/paste terminal output in output tags
Posts: 687
Threads: 37
Joined: Sep 2016
(May-22-2017, 08:39 AM)Bani Wrote: what should I do to solve this problem?
Not use Python3 as the default. Reset the default to python2. If you need Python v3, 1) teach your fingers to use the python3 command, or use a "shebang" that mentions python3 in your scripts (plenty of examples above).
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
|