Why won't scikit-image work for Python3?












1















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?










share|improve this question























  • 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


















1















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?










share|improve this question























  • 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
















1












1








1








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?










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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 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



















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












1 Answer
1






active

oldest

votes


















0














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.






share|improve this answer


























  • 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 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













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
});


}
});














draft saved

draft discarded


















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









0














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.






share|improve this answer


























  • 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 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


















0














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.






share|improve this answer


























  • 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 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
















0












0








0







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.






share|improve this answer















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.







share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 21 at 10:54

























answered Jan 21 at 9:54









karelkarel

59k13128149




59k13128149













  • 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 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





















  • 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 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



















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




















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

How to make a Squid Proxy server?

Is this a new Fibonacci Identity?

19世紀