Python Forum
Python can't find module installed in anaconda
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python can't find module installed in anaconda
#1
Hi there,

I used pip to install couchdb, yet
import couchdb
returns
No module named 'couchdb'
.

Yet if I try and install it again, it says it's already installed at:
/home/me/anaconda3/lib/python3.5/site-packages.

What do I have to do so that I can use it please?
Reply
#2
There is executable python file in /home/user/anaconda3/bin/. Run it and you'll get a python interpreter which looks at anaconda3's lib directory for 'conda install package' installed modules.

If you want just to open a terminal and run directly anaconda3/bin/python make a shortcut to it.

sudo ln -s /home/user/anaconda3/bin/python /usr/bin/apython
sudo shmod +x /usr/bin/apython
Then you can just run any script in any directory with apython script.py
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#3
I've ended up removing anaconda as it's too complicated and at my level I'm not using it, and yes I did remove it from the .bashrc file. But I can't get modules to install for python3, only python2, how can I change that?
Reply
#4
Quote:But I can't get modules to install for python3, only python2, how can I change that?
Since you removed anaconda does that mean this was regarding anaconda or the default python installation?
Recommended Tutorials:
Reply
#5
Let's see if I get you. You want to learn Python and you came across Anaconda package and just install it? If that is the case you probably don't need anaconda. At least till you learn what is Python virtual environment. Anaconda is using it and this is the proper way.

If you run Linux you have Python already installed.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#6
(Oct-14-2016, 09:03 PM)iFunKtion Wrote: I've ended up removing anaconda as it's too complicated and at my level I'm not using it, and yes I did remove it from the .bashrc file. But I can't get modules to install for python3, only python2, how can I change that?

From the terminal, have you tried pip3 install package_name ?
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
Reply
#7
If you run python in the terminal, the default version can be python2.x. Python2 wouldn't import a module which is located in python3.5/site-packages/.
You have to run python3. In the script file the shebang should be #!/usr/bin/env python3
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#8
Hi guys, thanks for all your input. So ultimately, I was just getting ahead of myself with this, so reinstalled the operating system so I can start again. This is one of those situations where I am not what you would call a newbe anymore, yet not yet in the intermediate level of programming. I am now sticking with only Python 3 until I feel fully versed be able to switch between python3 and python2. Anaconda is out the window currently as I certainly am not requiring anything from that as of yet.

@wavic, You are as spot on as can possibly be. Thankyou
Reply
#9
Quote: I am now sticking with only Python 3 until I feel fully versed be able to switch between python3 and python2. Anaconda is out the window currently
You dont need anaconda to have numerous versions of python installed. If that was your intentions with it.
Recommended Tutorials:
Reply
#10
I had the same problem, I just have one python version install now, a pain seeing I started with 3.5 but the python course I signed up for is in 2.7. Python as a long way to go be for it is user friendly, when is comes to install. Most of my problem as been with installing stuff and making it work. I like python is is fast and easy to right app.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Launcher (on Windows) only necessary when 2 or more Python versions installed? pstein 1 265 Feb-17-2024, 12:43 PM
Last Post: deanhystad
  Anaconda 2.4.2: The JupyterLab 3.5.3 fails to run the python code of the Geographical jamalnuman 0 313 Aug-23-2023, 07:48 AM
Last Post: jamalnuman
  can not import anaconda pandas module. PySpark pandas module is imported!! aupres 0 680 Aug-06-2023, 01:09 AM
Last Post: aupres
  Pip lists the module but python does not find it Dato 2 1,232 Apr-13-2023, 06:40 AM
Last Post: Dato
  ModuleNotFound but pip shows module installed biscotty666 2 1,512 Jul-14-2022, 05:17 PM
Last Post: Axel_Erfurt
  Installed versions of Python SamHobbs 5 2,463 Sep-02-2021, 02:28 PM
Last Post: jefsummers
  No module named 'pysolar' - even tough pysolar is installed - What am I doing wrong? Jghurt 5 4,125 May-08-2021, 07:03 PM
Last Post: Jghurt
  unable to find module in su mode? korenron 2 1,875 Jan-10-2021, 07:41 PM
Last Post: Gribouillis
  I seem to have two versions of python 3.7.9 installed miner_tom 7 4,352 Nov-22-2020, 06:42 PM
Last Post: miner_tom
  Cannot find module 'torch' ErnestTBass 6 3,543 Oct-13-2020, 05:33 PM
Last Post: ErnestTBass

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020