ImportError after Successful Installing Packages in Conda Environment





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







1















I installed python-3.5 on Ubuntu 16.04.3 and planned to have python-3.6 as well with conda environment. For the conda enviornment with python-3.6, I named it as py36. However, though I installed package a package in (py36) environment, python complained that there was no such module. Why was python confused?



Below is the code I ran:



$conda create --name py36 python=3.6
$ source activate py36
(py36) xxx@Alienware:~/crawler$ conda install --name py36 -c anaconda cached-pro
(py36) xxx@Alienware:~/crawler$ conda list -n py36
# packages in environment at /home/xxx/anaconda3/envs/py36:
#
ca-certificates 2018.03.07 0
cached-property 1.5.1 <pip>
cached-property 1.5.1 py36_0 anaconda
certifi 2018.11.29 py36_0
libedit 3.1.20170329 h6b74fdf_2
libffi 3.2.1 hd88cf55_4
libgcc-ng 8.2.0 hdf63c60_1
libstdcxx-ng 8.2.0 hdf63c60_1
ncurses 6.1 he6710b0_1
openssl 1.1.1a h7b6447c_0
pip 18.1 py36_0
python 3.6.7 h0371630_0
readline 7.0 h7b6447c_5
scrapy 1.5.1 py36_0
setuptools 40.6.3 py36_0
sqlite 3.26.0 h7b6447c_0
tk 8.6.8 hbc83047_0
wheel 0.32.3 py36_0
xz 5.2.4 h14c3975_4
zlib 1.2.11 h7b6447c_3


(py36) xxx@Alienware:~/crawler$ scrapy crawl transcripts --logfile output.log


Yet I got the following output. But I just checked that cached_property was installed in my environment. What did I miss here?



ImportError: No module named 'cached_property'









share|improve this question

























  • When you run pip, there's a chance you're still using global default Python, not the virtualenv's one.

    – dmitryro
    Jan 2 at 15:47













  • Do you have scrapy installed in your virtualenv?

    – Mortz
    Jan 2 at 15:53











  • @dmitryro Yes you are right. I added the results from conda list -n py36. It also confirms that the package was successfully installed.

    – Angel Chen
    Jan 3 at 3:10











  • @Mortz Yes I did. I'm not using virtualenv but conda enviornment which is similar.

    – Angel Chen
    Jan 3 at 6:08


















1















I installed python-3.5 on Ubuntu 16.04.3 and planned to have python-3.6 as well with conda environment. For the conda enviornment with python-3.6, I named it as py36. However, though I installed package a package in (py36) environment, python complained that there was no such module. Why was python confused?



Below is the code I ran:



$conda create --name py36 python=3.6
$ source activate py36
(py36) xxx@Alienware:~/crawler$ conda install --name py36 -c anaconda cached-pro
(py36) xxx@Alienware:~/crawler$ conda list -n py36
# packages in environment at /home/xxx/anaconda3/envs/py36:
#
ca-certificates 2018.03.07 0
cached-property 1.5.1 <pip>
cached-property 1.5.1 py36_0 anaconda
certifi 2018.11.29 py36_0
libedit 3.1.20170329 h6b74fdf_2
libffi 3.2.1 hd88cf55_4
libgcc-ng 8.2.0 hdf63c60_1
libstdcxx-ng 8.2.0 hdf63c60_1
ncurses 6.1 he6710b0_1
openssl 1.1.1a h7b6447c_0
pip 18.1 py36_0
python 3.6.7 h0371630_0
readline 7.0 h7b6447c_5
scrapy 1.5.1 py36_0
setuptools 40.6.3 py36_0
sqlite 3.26.0 h7b6447c_0
tk 8.6.8 hbc83047_0
wheel 0.32.3 py36_0
xz 5.2.4 h14c3975_4
zlib 1.2.11 h7b6447c_3


(py36) xxx@Alienware:~/crawler$ scrapy crawl transcripts --logfile output.log


Yet I got the following output. But I just checked that cached_property was installed in my environment. What did I miss here?



ImportError: No module named 'cached_property'









share|improve this question

























  • When you run pip, there's a chance you're still using global default Python, not the virtualenv's one.

    – dmitryro
    Jan 2 at 15:47













  • Do you have scrapy installed in your virtualenv?

    – Mortz
    Jan 2 at 15:53











  • @dmitryro Yes you are right. I added the results from conda list -n py36. It also confirms that the package was successfully installed.

    – Angel Chen
    Jan 3 at 3:10











  • @Mortz Yes I did. I'm not using virtualenv but conda enviornment which is similar.

    – Angel Chen
    Jan 3 at 6:08














1












1








1


0






I installed python-3.5 on Ubuntu 16.04.3 and planned to have python-3.6 as well with conda environment. For the conda enviornment with python-3.6, I named it as py36. However, though I installed package a package in (py36) environment, python complained that there was no such module. Why was python confused?



Below is the code I ran:



$conda create --name py36 python=3.6
$ source activate py36
(py36) xxx@Alienware:~/crawler$ conda install --name py36 -c anaconda cached-pro
(py36) xxx@Alienware:~/crawler$ conda list -n py36
# packages in environment at /home/xxx/anaconda3/envs/py36:
#
ca-certificates 2018.03.07 0
cached-property 1.5.1 <pip>
cached-property 1.5.1 py36_0 anaconda
certifi 2018.11.29 py36_0
libedit 3.1.20170329 h6b74fdf_2
libffi 3.2.1 hd88cf55_4
libgcc-ng 8.2.0 hdf63c60_1
libstdcxx-ng 8.2.0 hdf63c60_1
ncurses 6.1 he6710b0_1
openssl 1.1.1a h7b6447c_0
pip 18.1 py36_0
python 3.6.7 h0371630_0
readline 7.0 h7b6447c_5
scrapy 1.5.1 py36_0
setuptools 40.6.3 py36_0
sqlite 3.26.0 h7b6447c_0
tk 8.6.8 hbc83047_0
wheel 0.32.3 py36_0
xz 5.2.4 h14c3975_4
zlib 1.2.11 h7b6447c_3


(py36) xxx@Alienware:~/crawler$ scrapy crawl transcripts --logfile output.log


Yet I got the following output. But I just checked that cached_property was installed in my environment. What did I miss here?



ImportError: No module named 'cached_property'









share|improve this question
















I installed python-3.5 on Ubuntu 16.04.3 and planned to have python-3.6 as well with conda environment. For the conda enviornment with python-3.6, I named it as py36. However, though I installed package a package in (py36) environment, python complained that there was no such module. Why was python confused?



Below is the code I ran:



$conda create --name py36 python=3.6
$ source activate py36
(py36) xxx@Alienware:~/crawler$ conda install --name py36 -c anaconda cached-pro
(py36) xxx@Alienware:~/crawler$ conda list -n py36
# packages in environment at /home/xxx/anaconda3/envs/py36:
#
ca-certificates 2018.03.07 0
cached-property 1.5.1 <pip>
cached-property 1.5.1 py36_0 anaconda
certifi 2018.11.29 py36_0
libedit 3.1.20170329 h6b74fdf_2
libffi 3.2.1 hd88cf55_4
libgcc-ng 8.2.0 hdf63c60_1
libstdcxx-ng 8.2.0 hdf63c60_1
ncurses 6.1 he6710b0_1
openssl 1.1.1a h7b6447c_0
pip 18.1 py36_0
python 3.6.7 h0371630_0
readline 7.0 h7b6447c_5
scrapy 1.5.1 py36_0
setuptools 40.6.3 py36_0
sqlite 3.26.0 h7b6447c_0
tk 8.6.8 hbc83047_0
wheel 0.32.3 py36_0
xz 5.2.4 h14c3975_4
zlib 1.2.11 h7b6447c_3


(py36) xxx@Alienware:~/crawler$ scrapy crawl transcripts --logfile output.log


Yet I got the following output. But I just checked that cached_property was installed in my environment. What did I miss here?



ImportError: No module named 'cached_property'






python-3.x virtualenv conda






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 3 at 6:09







Angel Chen

















asked Jan 2 at 15:44









Angel ChenAngel Chen

307




307













  • When you run pip, there's a chance you're still using global default Python, not the virtualenv's one.

    – dmitryro
    Jan 2 at 15:47













  • Do you have scrapy installed in your virtualenv?

    – Mortz
    Jan 2 at 15:53











  • @dmitryro Yes you are right. I added the results from conda list -n py36. It also confirms that the package was successfully installed.

    – Angel Chen
    Jan 3 at 3:10











  • @Mortz Yes I did. I'm not using virtualenv but conda enviornment which is similar.

    – Angel Chen
    Jan 3 at 6:08



















  • When you run pip, there's a chance you're still using global default Python, not the virtualenv's one.

    – dmitryro
    Jan 2 at 15:47













  • Do you have scrapy installed in your virtualenv?

    – Mortz
    Jan 2 at 15:53











  • @dmitryro Yes you are right. I added the results from conda list -n py36. It also confirms that the package was successfully installed.

    – Angel Chen
    Jan 3 at 3:10











  • @Mortz Yes I did. I'm not using virtualenv but conda enviornment which is similar.

    – Angel Chen
    Jan 3 at 6:08

















When you run pip, there's a chance you're still using global default Python, not the virtualenv's one.

– dmitryro
Jan 2 at 15:47







When you run pip, there's a chance you're still using global default Python, not the virtualenv's one.

– dmitryro
Jan 2 at 15:47















Do you have scrapy installed in your virtualenv?

– Mortz
Jan 2 at 15:53





Do you have scrapy installed in your virtualenv?

– Mortz
Jan 2 at 15:53













@dmitryro Yes you are right. I added the results from conda list -n py36. It also confirms that the package was successfully installed.

– Angel Chen
Jan 3 at 3:10





@dmitryro Yes you are right. I added the results from conda list -n py36. It also confirms that the package was successfully installed.

– Angel Chen
Jan 3 at 3:10













@Mortz Yes I did. I'm not using virtualenv but conda enviornment which is similar.

– Angel Chen
Jan 3 at 6:08





@Mortz Yes I did. I'm not using virtualenv but conda enviornment which is similar.

– Angel Chen
Jan 3 at 6:08












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
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%2fstackoverflow.com%2fquestions%2f54009193%2fimporterror-after-successful-installing-packages-in-conda-environment%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • 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%2fstackoverflow.com%2fquestions%2f54009193%2fimporterror-after-successful-installing-packages-in-conda-environment%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

'app-layout' is not a known element: how to share Component with different Modules

android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

WPF add header to Image with URL pettitions [duplicate]