Why won't scikit-image work for Python3?
So I'm trying to use scikit-image for several functions on images. One such function is converting an image from rgb to hsv where I took my image (img) and said
from skimage.color import rgb2hsv
img_hsv = color.rgb2hsv(img)
Python didn't seem to have a problem recognizing the skimage statements when importing it but when I call color.rgb2hsv I get an error that says 'color' is not defined
. If I just say img_hsv = rgb2hsv
then it says 'rgb2hsv' is not defined
. I tried to install scikit-image by cloning it from github and following these instructions.
http://scikit-image.org/docs/dev/install.html
For some reason, whenever I get to the part where I have to say pip install -e .
, it says python 2.7 discovered. You must install scikit-image lower than 0.15.
but I do have Python 3.6 so I should be able to install it for 3.6 but for some reason, Linux isn't letting me install it no matter what I do. So what exactly can I do to fix this?
software-installation python colors images
add a comment |
So I'm trying to use scikit-image for several functions on images. One such function is converting an image from rgb to hsv where I took my image (img) and said
from skimage.color import rgb2hsv
img_hsv = color.rgb2hsv(img)
Python didn't seem to have a problem recognizing the skimage statements when importing it but when I call color.rgb2hsv I get an error that says 'color' is not defined
. If I just say img_hsv = rgb2hsv
then it says 'rgb2hsv' is not defined
. I tried to install scikit-image by cloning it from github and following these instructions.
http://scikit-image.org/docs/dev/install.html
For some reason, whenever I get to the part where I have to say pip install -e .
, it says python 2.7 discovered. You must install scikit-image lower than 0.15.
but I do have Python 3.6 so I should be able to install it for 3.6 but for some reason, Linux isn't letting me install it no matter what I do. So what exactly can I do to fix this?
software-installation python colors images
pip installs the latest stable versions of Python packages by default. What's wrong with installing the latest stable version withpip install scikit-image
instead of cloning it from GitHub? The latest stable version of scikit-image 0.14.2 (Image processing routines for SciPy) is 0.14.2.
– karel
Jan 21 at 9:50
add a comment |
So I'm trying to use scikit-image for several functions on images. One such function is converting an image from rgb to hsv where I took my image (img) and said
from skimage.color import rgb2hsv
img_hsv = color.rgb2hsv(img)
Python didn't seem to have a problem recognizing the skimage statements when importing it but when I call color.rgb2hsv I get an error that says 'color' is not defined
. If I just say img_hsv = rgb2hsv
then it says 'rgb2hsv' is not defined
. I tried to install scikit-image by cloning it from github and following these instructions.
http://scikit-image.org/docs/dev/install.html
For some reason, whenever I get to the part where I have to say pip install -e .
, it says python 2.7 discovered. You must install scikit-image lower than 0.15.
but I do have Python 3.6 so I should be able to install it for 3.6 but for some reason, Linux isn't letting me install it no matter what I do. So what exactly can I do to fix this?
software-installation python colors images
So I'm trying to use scikit-image for several functions on images. One such function is converting an image from rgb to hsv where I took my image (img) and said
from skimage.color import rgb2hsv
img_hsv = color.rgb2hsv(img)
Python didn't seem to have a problem recognizing the skimage statements when importing it but when I call color.rgb2hsv I get an error that says 'color' is not defined
. If I just say img_hsv = rgb2hsv
then it says 'rgb2hsv' is not defined
. I tried to install scikit-image by cloning it from github and following these instructions.
http://scikit-image.org/docs/dev/install.html
For some reason, whenever I get to the part where I have to say pip install -e .
, it says python 2.7 discovered. You must install scikit-image lower than 0.15.
but I do have Python 3.6 so I should be able to install it for 3.6 but for some reason, Linux isn't letting me install it no matter what I do. So what exactly can I do to fix this?
software-installation python colors images
software-installation python colors images
asked Jan 21 at 9:46
Brandon MacLeodBrandon MacLeod
82
82
pip installs the latest stable versions of Python packages by default. What's wrong with installing the latest stable version withpip install scikit-image
instead of cloning it from GitHub? The latest stable version of scikit-image 0.14.2 (Image processing routines for SciPy) is 0.14.2.
– karel
Jan 21 at 9:50
add a comment |
pip installs the latest stable versions of Python packages by default. What's wrong with installing the latest stable version withpip install scikit-image
instead of cloning it from GitHub? The latest stable version of scikit-image 0.14.2 (Image processing routines for SciPy) is 0.14.2.
– karel
Jan 21 at 9:50
pip installs the latest stable versions of Python packages by default. What's wrong with installing the latest stable version with
pip install scikit-image
instead of cloning it from GitHub? The latest stable version of scikit-image 0.14.2 (Image processing routines for SciPy) is 0.14.2.– karel
Jan 21 at 9:50
pip installs the latest stable versions of Python packages by default. What's wrong with installing the latest stable version with
pip install scikit-image
instead of cloning it from GitHub? The latest stable version of scikit-image 0.14.2 (Image processing routines for SciPy) is 0.14.2.– karel
Jan 21 at 9:50
add a comment |
1 Answer
1
active
oldest
votes
pip installs the latest stable versions of Python packages by default. What's wrong with installing the latest stable version with pip install scikit-image
instead of cloning it from GitHub? The latest stable version of scikit-image (Image processing routines for SciPy) is 0.14.2.
Open the terminal and type:
sudo apt install python3-pip
sudo pip3 install scikit-image
If numpy, scipy, pillow and matplotlib are not already installed the above command will also install those packages as dependencies.
btw You got an error that says NameError: name 'color' is not defined
because you forgot to import color from skimage.
I tried that and it's not working. it says that everything is installed correctly but for some really strange reason it keeps saying that names like 'color' and 'rgb2hsv' are not defined even though I clearly imported them. It keeps saying scikit-image is properly installed so do you think it's a problem with my python code?
– Brandon MacLeod
Jan 21 at 9:57
It's possible that there is a problem with the Python code, but debugging the code is out of scope for Ask Ubuntu, but on topic at Stack Overflow. Nonetheless if you copy/paste the code to Ubuntu Pastebin, and provide a link to the pastebin in a comment, I will try running it, and see what happens. I am using Python 3.6.
– karel
Jan 21 at 10:01
1
paste.ubuntu.com/p/dCgNPjK6FN
– Brandon MacLeod
Jan 21 at 10:05
There is an error in your Python code. After the line in your code that saysimport colorsys
add a new line that saysfrom skimage import color
and then the next line after that isfrom skimage.color import rgb2hsv
as before. You see the error is that you forgot to import color. Do this and your Python code will run successfully. I am using Python 3.6.
– karel
Jan 21 at 10:30
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1111594%2fwhy-wont-scikit-image-work-for-python3%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
pip installs the latest stable versions of Python packages by default. What's wrong with installing the latest stable version with pip install scikit-image
instead of cloning it from GitHub? The latest stable version of scikit-image (Image processing routines for SciPy) is 0.14.2.
Open the terminal and type:
sudo apt install python3-pip
sudo pip3 install scikit-image
If numpy, scipy, pillow and matplotlib are not already installed the above command will also install those packages as dependencies.
btw You got an error that says NameError: name 'color' is not defined
because you forgot to import color from skimage.
I tried that and it's not working. it says that everything is installed correctly but for some really strange reason it keeps saying that names like 'color' and 'rgb2hsv' are not defined even though I clearly imported them. It keeps saying scikit-image is properly installed so do you think it's a problem with my python code?
– Brandon MacLeod
Jan 21 at 9:57
It's possible that there is a problem with the Python code, but debugging the code is out of scope for Ask Ubuntu, but on topic at Stack Overflow. Nonetheless if you copy/paste the code to Ubuntu Pastebin, and provide a link to the pastebin in a comment, I will try running it, and see what happens. I am using Python 3.6.
– karel
Jan 21 at 10:01
1
paste.ubuntu.com/p/dCgNPjK6FN
– Brandon MacLeod
Jan 21 at 10:05
There is an error in your Python code. After the line in your code that saysimport colorsys
add a new line that saysfrom skimage import color
and then the next line after that isfrom skimage.color import rgb2hsv
as before. You see the error is that you forgot to import color. Do this and your Python code will run successfully. I am using Python 3.6.
– karel
Jan 21 at 10:30
add a comment |
pip installs the latest stable versions of Python packages by default. What's wrong with installing the latest stable version with pip install scikit-image
instead of cloning it from GitHub? The latest stable version of scikit-image (Image processing routines for SciPy) is 0.14.2.
Open the terminal and type:
sudo apt install python3-pip
sudo pip3 install scikit-image
If numpy, scipy, pillow and matplotlib are not already installed the above command will also install those packages as dependencies.
btw You got an error that says NameError: name 'color' is not defined
because you forgot to import color from skimage.
I tried that and it's not working. it says that everything is installed correctly but for some really strange reason it keeps saying that names like 'color' and 'rgb2hsv' are not defined even though I clearly imported them. It keeps saying scikit-image is properly installed so do you think it's a problem with my python code?
– Brandon MacLeod
Jan 21 at 9:57
It's possible that there is a problem with the Python code, but debugging the code is out of scope for Ask Ubuntu, but on topic at Stack Overflow. Nonetheless if you copy/paste the code to Ubuntu Pastebin, and provide a link to the pastebin in a comment, I will try running it, and see what happens. I am using Python 3.6.
– karel
Jan 21 at 10:01
1
paste.ubuntu.com/p/dCgNPjK6FN
– Brandon MacLeod
Jan 21 at 10:05
There is an error in your Python code. After the line in your code that saysimport colorsys
add a new line that saysfrom skimage import color
and then the next line after that isfrom skimage.color import rgb2hsv
as before. You see the error is that you forgot to import color. Do this and your Python code will run successfully. I am using Python 3.6.
– karel
Jan 21 at 10:30
add a comment |
pip installs the latest stable versions of Python packages by default. What's wrong with installing the latest stable version with pip install scikit-image
instead of cloning it from GitHub? The latest stable version of scikit-image (Image processing routines for SciPy) is 0.14.2.
Open the terminal and type:
sudo apt install python3-pip
sudo pip3 install scikit-image
If numpy, scipy, pillow and matplotlib are not already installed the above command will also install those packages as dependencies.
btw You got an error that says NameError: name 'color' is not defined
because you forgot to import color from skimage.
pip installs the latest stable versions of Python packages by default. What's wrong with installing the latest stable version with pip install scikit-image
instead of cloning it from GitHub? The latest stable version of scikit-image (Image processing routines for SciPy) is 0.14.2.
Open the terminal and type:
sudo apt install python3-pip
sudo pip3 install scikit-image
If numpy, scipy, pillow and matplotlib are not already installed the above command will also install those packages as dependencies.
btw You got an error that says NameError: name 'color' is not defined
because you forgot to import color from skimage.
edited Jan 21 at 10:54
answered Jan 21 at 9:54
karelkarel
59.5k13129151
59.5k13129151
I tried that and it's not working. it says that everything is installed correctly but for some really strange reason it keeps saying that names like 'color' and 'rgb2hsv' are not defined even though I clearly imported them. It keeps saying scikit-image is properly installed so do you think it's a problem with my python code?
– Brandon MacLeod
Jan 21 at 9:57
It's possible that there is a problem with the Python code, but debugging the code is out of scope for Ask Ubuntu, but on topic at Stack Overflow. Nonetheless if you copy/paste the code to Ubuntu Pastebin, and provide a link to the pastebin in a comment, I will try running it, and see what happens. I am using Python 3.6.
– karel
Jan 21 at 10:01
1
paste.ubuntu.com/p/dCgNPjK6FN
– Brandon MacLeod
Jan 21 at 10:05
There is an error in your Python code. After the line in your code that saysimport colorsys
add a new line that saysfrom skimage import color
and then the next line after that isfrom skimage.color import rgb2hsv
as before. You see the error is that you forgot to import color. Do this and your Python code will run successfully. I am using Python 3.6.
– karel
Jan 21 at 10:30
add a comment |
I tried that and it's not working. it says that everything is installed correctly but for some really strange reason it keeps saying that names like 'color' and 'rgb2hsv' are not defined even though I clearly imported them. It keeps saying scikit-image is properly installed so do you think it's a problem with my python code?
– Brandon MacLeod
Jan 21 at 9:57
It's possible that there is a problem with the Python code, but debugging the code is out of scope for Ask Ubuntu, but on topic at Stack Overflow. Nonetheless if you copy/paste the code to Ubuntu Pastebin, and provide a link to the pastebin in a comment, I will try running it, and see what happens. I am using Python 3.6.
– karel
Jan 21 at 10:01
1
paste.ubuntu.com/p/dCgNPjK6FN
– Brandon MacLeod
Jan 21 at 10:05
There is an error in your Python code. After the line in your code that saysimport colorsys
add a new line that saysfrom skimage import color
and then the next line after that isfrom skimage.color import rgb2hsv
as before. You see the error is that you forgot to import color. Do this and your Python code will run successfully. I am using Python 3.6.
– karel
Jan 21 at 10:30
I tried that and it's not working. it says that everything is installed correctly but for some really strange reason it keeps saying that names like 'color' and 'rgb2hsv' are not defined even though I clearly imported them. It keeps saying scikit-image is properly installed so do you think it's a problem with my python code?
– Brandon MacLeod
Jan 21 at 9:57
I tried that and it's not working. it says that everything is installed correctly but for some really strange reason it keeps saying that names like 'color' and 'rgb2hsv' are not defined even though I clearly imported them. It keeps saying scikit-image is properly installed so do you think it's a problem with my python code?
– Brandon MacLeod
Jan 21 at 9:57
It's possible that there is a problem with the Python code, but debugging the code is out of scope for Ask Ubuntu, but on topic at Stack Overflow. Nonetheless if you copy/paste the code to Ubuntu Pastebin, and provide a link to the pastebin in a comment, I will try running it, and see what happens. I am using Python 3.6.
– karel
Jan 21 at 10:01
It's possible that there is a problem with the Python code, but debugging the code is out of scope for Ask Ubuntu, but on topic at Stack Overflow. Nonetheless if you copy/paste the code to Ubuntu Pastebin, and provide a link to the pastebin in a comment, I will try running it, and see what happens. I am using Python 3.6.
– karel
Jan 21 at 10:01
1
1
paste.ubuntu.com/p/dCgNPjK6FN
– Brandon MacLeod
Jan 21 at 10:05
paste.ubuntu.com/p/dCgNPjK6FN
– Brandon MacLeod
Jan 21 at 10:05
There is an error in your Python code. After the line in your code that says
import colorsys
add a new line that says from skimage import color
and then the next line after that is from skimage.color import rgb2hsv
as before. You see the error is that you forgot to import color. Do this and your Python code will run successfully. I am using Python 3.6.– karel
Jan 21 at 10:30
There is an error in your Python code. After the line in your code that says
import colorsys
add a new line that says from skimage import color
and then the next line after that is from skimage.color import rgb2hsv
as before. You see the error is that you forgot to import color. Do this and your Python code will run successfully. I am using Python 3.6.– karel
Jan 21 at 10:30
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1111594%2fwhy-wont-scikit-image-work-for-python3%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
pip installs the latest stable versions of Python packages by default. What's wrong with installing the latest stable version with
pip install scikit-image
instead of cloning it from GitHub? The latest stable version of scikit-image 0.14.2 (Image processing routines for SciPy) is 0.14.2.– karel
Jan 21 at 9:50