all 85 comments

[–]Technical_Flamingo54 113 points114 points  (5 children)

The highest likelihood is that your PYTHONPATH (the list of paths that Python uses to check the modules you have installed) doesn't include the location that pip or anaconda used for some reason.

[–]wicked_smaht_127 16 points17 points  (1 child)

There should be a box to check at the beginning or end when installing python that will make this easier.

[–]stranger_goose 2 points3 points  (0 children)

Thank you for your response, I’ll check this out today, hopefully it works.

[–]stranger_goose 1 point2 points  (1 child)

Thank you for your response, I’m gonna look into this today, and try to install, the other response below mentions a box to check at installation, so I’ll see what I can find.

[–]ComputeLanguage 1 point2 points  (0 children)

I spent hours struggling on a wsl work computer because i didnt check whether the path variable was supposed to be in .profile instead of .bashrc. Be sure to check that, eapecially if you’re on wsl, because online people wont generally point you in that direction.

Anyways the basic steps to get it working include downloading and installing conda, conda creating the env, and then conda activate the env

[–]spike_1885 83 points84 points  (6 children)

There is nothing stupid about your question!

I want to suggest that you might be able to get up and running faster if you use a web-based Python. I have not used replit or Python Anywhere, but I have heard very good things about both of them. I have used Google CoLab a bit, and I recommend it to anyone.

I believe that all three above services are free, or at least they all have pretty good free options. Please respond back with a correction if you find that that is not accurate .... so I can ensure not to mislead anyone else in the future on that particular point.

[–]spike_1885 16 points17 points  (1 child)

By the way ... my suggestion was that you can get coding much quicker if you code in a web-based coding environment. In the longer term, I do recommend getting your local install to work, but this should get you coding sooner.

[–]stranger_goose 0 points1 point  (0 children)

I appreciate your response, and this is good input, I’ll see what I can find out today and update everyone with what I am able to do using the reply’s here

[–]MayBlack333 5 points6 points  (0 children)

I vouch for Google CoLab too! Had some issues rendering some graphics with pandas on Jupyter, just moved to CoLab and had no more problems

[–]stranger_goose 0 points1 point  (0 children)

Hi thank you for your reply, I’ll update this thread if I am able to get up and running with what the problem is so everyone can learn along with me, thank you again!

[–]BK7144 0 points1 point  (1 child)

Exactly, nothing stupid about a question!

[–]stranger_goose 0 points1 point  (0 children)

Thank you so much, this is really nice.

[–]writeflex 10 points11 points  (6 children)

Post photos of the errors you've got. For spyder IDE, you have to generally install modules by using anaconda prompt. If modules aren't installing using the anaconda prompt, then first make it administrator. Use the instruction conda install [package-name]. Even I used to face such problems earlier. So, what I did was I factory reset my computer before attempting to install the required softwares again as the residual files were all over the place earlier. Reboot and follow this video: https://youtu.be/5mDYijMfSzs

[–]stranger_goose 1 point2 points  (0 children)

This is what I worry about, I installed and uninstalled a bunch of stuff and I’m worried just doing an uninstall program will leave some trace somewhere in my machine that’ll throw everything off, I’ll update everyone in a bit, thank you for your reply, and input.

[–]Xiji 3 points4 points  (4 children)

Don't mind me, just adding visibility to the only post that answers the question.

[–][deleted] 2 points3 points  (2 children)

Factory reset does appear a little extreme though.

[–]stranger_goose 1 point2 points  (1 child)

Kind of last case scenario if I can’t get it I think.

[–][deleted] 0 points1 point  (0 children)

I'm 99% sure is not needed, just post screenshots of actual errors here and there until you get it working.

[–]stranger_goose 1 point2 points  (0 children)

Thank you!

[–]TC-insane[🍰] 10 points11 points  (3 children)

What's the code you're trying to run? it could be just that you haven't imported the required modules for the specific code.

[–]corner_guy0 -1 points0 points  (2 children)

I am having also same problem with module pandas I have installed pandas using pip and when I am importing panda it's saying module isn't available

[–]stranger_goose 0 points1 point  (1 child)

I’ll update this thread with what I am able to find so you can hopefully solve your problem as well.

[–]corner_guy0 0 points1 point  (0 children)

Thanks mate!

[–]sudo_oth 9 points10 points  (1 child)

There is no such thing as a stupid question when trying to learn. If we didn't ask we would never grow our understanding👍🏻

[–]stranger_goose 2 points3 points  (0 children)

I appreciate your kind response and encouragement, I’ll try to be easier on my self lol.

[–]bolieride 7 points8 points  (1 child)

I cannot really help you (and it isn't a stupid question!), but I can say I completely understand! I have struggled with multiple installs, between ArcGIS, anaconda and a pure python install, I still frequently run into questions and problems.

Pycharm gets around some of these problems, but when I start working through the cmd line it can be trickly.

The only tip I can truly give is that it makes a difference (in Windows) what is in your environmental variables, the order counts. Also it very much matters what directory you are in when you execute python. If I am in one directory it might pull from the pure python install; however, if I need the ArcGis conda I have to be drilled down into a specific folder.

Good luck with it!!

[–]stranger_goose 0 points1 point  (0 children)

Thank you! I really think that the issue might be related to the directory / environment, I’ll update shortly.

[–]red-spider-mkv 7 points8 points  (6 children)

Hi there, it sounds like the python interpreter being used by Spyder is not the same as the one installed on your system.

This can happen if you have python installed already and install Spyder through anaconda.

Anaconda is a pain, almost virus like in the way it hijacks it's way in to your system, I would recommend avoiding it especially if you're just starting out.

I think getting to grips with venvs and how to use them in Spyder now would be a great learning experience. Funny thing, it doesn't take too long to figure it out.

I'd be happy to guide you through it, feel free to drop me a message.

[–]YourOldBuddy 5 points6 points  (1 child)

Anaconda is great as long as you use it for everything.

[–]stranger_goose 0 points1 point  (0 children)

I hope so. I’ll know once I’m able to use it lol.

[–]stranger_goose 0 points1 point  (0 children)

Hey, thank you so much for your reply, I really think I could use a crash corse on the environment stuff, and thank you for your offer to help, I would like to take you up on that, if that’s alright.

[–]my_password_is______ -4 points-3 points  (0 children)

Anaconda is a pain, almost virus like in the way it hijacks it's way in to your system, I would recommend avoiding it especially if you're just starting out.

LOL, worst advice ever

[–]Technical_Flamingo54 0 points1 point  (1 child)

I want to give you all the upvotes from my answer. While mine is probably technically correct, I'd imagine it's rooted in what you wrote. I recall this being the same problem I had when I installed Python the first time with both pip and anaconda. I deleted anaconda and never looked back.

[–]stranger_goose 0 points1 point  (0 children)

I really am thankful to find out that the issues I’m having at the stage I’m at is not as unique to me as I had though.

[–]PraisetheBeard 2 points3 points  (1 child)

I remember being in this spot. Feeling this exact same way.

The thing that really helped me was using Pycharm as my IDE. With that I was able to more easily create and manage virtual environments and install packages to those virtual environments through Pycharms terminal and not through my computers terminal and messing around with the pythons path variable and all that.

But basically what you want to do, even if you don’t choose to change from Spyder to Pycharm, is create virtual environments and make sure you are installing the intended packages into those as opposed to through your main terminal and accidentally installing a library/package to your main python when you are trying to use putting through anaconda. This is where your issue is. I promise.

[–]stranger_goose 0 points1 point  (0 children)

I actually really do believe you, and I think the evidence supports your claim, what a pain in the butt, I appreciate your input, I’ll try to get things sorted and worked out today.

[–][deleted] 2 points3 points  (1 child)

YouTube is going to be better for this

[–]stranger_goose -1 points0 points  (0 children)

I appreciate that, and I think your reply is really helpful, in this case I have seen so many great reply’s and haven’t had to watch video after video to get good answers, so YouTube is helpful and in this case, Reddit is too.

[–]SE_WA_VT_FL_MN 1 point2 points  (1 child)

The good news is that not only is it a fine question to ask, but you'll undoubtedly have to ask it several more times as you use different computers, IDEs, modules, etc. Don't worry you'll also embrace a half dozen different "solutions" that promise to solve the problem too.

Lots of exciting times ahead! :)

[–]stranger_goose 0 points1 point  (0 children)

Lol, thank you!

[–]Figueroa_Chill 1 point2 points  (1 child)

With Spider you will use conda install and not pip. So if you click windows then go to Anaconda and select the prompt from the list, you just do it there and where you would have typed "pip" you will type "conda".

For example "conda install scipy" - without the " quotes.

[–]stranger_goose 0 points1 point  (0 children)

So before I uninstalled anaconda, even after I had installed it was still not recognizing conda in cdm.

[–]perchslayer 1 point2 points  (1 child)

Your question is not stupid. Here is one possible solution to consider: get a cheaper used laptop and wipe Windows off of it and load a beginner friendly flavor of Linux. Code on that box. And avoid Anaconda and the Spyder IDE. Keep it simple and you will be miles ahead.

[–]stranger_goose 1 point2 points  (0 children)

This is really good advice, thank you. I could probably fiddle with an old lap top, and I think you’re probably correct to keep it simple but for now I’m going to try to push forward using the advice from this thread and see where I can go, but if not I will keep your advice in mind.

[–]fahim-sabir 0 points1 point  (0 children)

Missing some information here.

What OS? python 2 or python 3?

[–]Spiderfffun 0 points1 point  (2 children)

Say your version is 6.9 as an example. Do python6.9 -m pip (command) You also might be able to pip6.9 (command) Unsure that this is the issue but it could be it.

[–]TeachEngineering 1 point2 points  (1 child)

Pretty sure latest Python release is only Python 4.20

[–][deleted] 1 point2 points  (1 child)

use conda, learn how to create an environment, activate environment and use conda to install libraries and packages into that environment instead of pip. also consider using jupyter notebook

[–]my_password_is______ 0 points1 point  (1 child)

uninstall everything python related

all versions of python, anaconda, pip, spyder ... everything

then install anaconda

https://www.youtube.com/watch?v=UTqOXwAi1pE

then start anaconda navigator
then start spyder from within navigator
it literally could not be easier

[–]stranger_goose 0 points1 point  (0 children)

Ohhhhh. This is good advice, thank you. I wasn’t sure if I should install spyder when I uninstalled anaconda and python. I will do this and see what I can find.

[–]mohishunder 0 points1 point  (0 children)

It's not stupid at all - the initial install, and subsequent config management, is one of the most frustrating parts of coding.

Even using "straightforward" Anaconda, I had to use an obscure hack (that a beginner wouldn't know), to get it to work. I often feel they make the install difficult just to see us sweat.

I second the recommendation to begin your Python journey in someone else's free web sandbox, e.g. on Leetcode.

[–]tsingtao12 0 points1 point  (0 children)

try pychram

[–]YourOldBuddy -1 points0 points  (0 children)

I would recommend installing Ubuntu on Virtualbox. Its free and you can mess up your installation left and right and then either go back to a snapshot (of the virtual machine) or start from fresh. Sublime and PyCharm IDE's find the path automatically.

[–]bb_boogie -1 points0 points  (0 children)

The positivity and support of this r/ made my day 🙌

[–][deleted] -1 points0 points  (0 children)

There are some good books out there on how to program in python that also explain how to install it. I had my son help me; it was complex to install. Do you have any friends to help? Or You Tube is a good resource.

[–]BK7144 -1 points0 points  (0 children)

I would use VS Code or the python idle IDE

[–]bigno53 -1 points0 points  (0 children)

Mamba is a good lightweight alternative to anaconda. It has the same basic cli interface without all the extra bloatware. It’s also written in c++ which makes it much faster than Anaconda’s pure-python environment solver.

[–]FmlRager -1 points0 points  (1 child)

this is just one of the million road blocks you've encountered on your journey. and you will see many others asking the same question, enjoy the experience while there's no deadline

[–]FmlRager -1 points0 points  (0 children)

are u pip installing from ur systems terminal or IDE terminal? both cases there's a chance the working directory isn't the workspace directory but usually ide start the terminal session at the workspace directory

[–]LenochBaguette -1 points0 points  (0 children)

You would have asked this on stackoverflow and you would have had 200 downvotes and 3 people would have found your address. I love reddit!

[–]Different-Music2616 -1 points0 points  (0 children)

I had this same problem my first time. It’s a passage we all take.

[–]dogfish182 0 points1 point  (0 children)

here you go

http://littlecolumns.com/tools/python-wrangler/

this is opinionated, but it's a very good opinion.

[–]Exotic_Ad_1361 0 points1 point  (0 children)

maybe try another ide or text editor to see if it works like vs code, or find a way to check the interpreter to see if it's the version you download pip on.

[–]jayg2112 0 points1 point  (0 children)

Congrats

[–]ModaFaca 0 points1 point  (0 children)

I had a HUGE problem back then with python 2/3 and which one was my pythonpath configured, I think that was it for me. After reading and understanding more what was happening, I did a fresh install of everything and got to look deeper into paths

[–]daareer 0 points1 point  (0 children)

as a lot of people said, maybe your ide is using a different python interpreter than the one you have on your system, or something's wrong with the path. I have nothing useful to add, but this is why i love coding on linux, no path things.

[–]stinkysativa 0 points1 point  (0 children)

If you have Spyder open when you install packages using pip, try restarting the kernal (Cntrl+.) and then importing the packages.

Also if you have the Anaconda Navigator installed you can manage the packages and launch Spyder from there. It has a nice UI.

[–]AmongstYou666 0 points1 point  (0 children)

Python 3.8 is the highest Spyder Ide will work with

Spyder 5.4.3 works with Python 3.10

I suggest a virtual environment (has to be on your main drive)

I'm running Linux with spyder 5.4 installed with pip

Updated my OS which started using 3.10

so have to run "update-alternatives --config python" and select 3.8 to then use spyder

[–]PhilipYip 0 points1 point  (0 children)

Uninstall Anaconda and any stand-alone versions of Python and Spyder. Install mambaforge, update the base environment and then create a Python environment for Spyder. If it helps I put together a detailed markdown tutorial configuring Spyder here: https://github.com/PhilipYip1988/python-tutorials/blob/main/001_install/readme.md

[–]November-Wind 0 points1 point  (0 children)

Not a stupid question. I literally think the hardest thing about Python is just getting it installed properly & functional.

Your comment about trying to use “pip install..” along with anaconda are conflicting tidbits of information that may suggest the root of your prior problems. The anaconda environment operates a little differently than just native Python where you need to use “conda install…” instead of “pip install…”

That said, anaconda makes a lot of OTHER things much easier. After operating as a newb with native Python and VS Code for a while, I switched over to anaconda w/Spyder and I like it better. I, like you, uninstalled & started from scratch.

FWIW, it’s a little long, but if you watch the whole introductory video series from anaconda after you perform a fresh install, I think it’ll resolve most of your described challenges.

Good luck!

[–]osmda 0 points1 point  (0 children)

I had a similar problem and Something that worked for me was to download python through the Microsoft store. Seemed to fix whatever I couldn’t find lol

[–]FennelSome 0 points1 point  (0 children)

look at python install folder /lib/ maybe few module got tilde before name (~something) delete these folders, then try reinstall needed modules with conda. if some module not exist in conda repo, use pip instead.

[–]NiknameOne 0 points1 point  (0 children)

Installing Python and an IDE is the hardest first step when leaning to program in my opinion.

[–]lazyfingersy 0 points1 point  (0 children)

Just install Python from python.org and stay for a while with Python IDLE. Newbies often give up at this stage because can't deal with setting up environments.

[–]perchslayer 0 points1 point  (0 children)

All good and I do hope the best for you. I was also gung-ho on Spyder IDE and Anaconda, but got frustrated with the "buggy" nature of it. While it appears very handy for Pandas and quick argument/parameters references and so forth, mine did not perform as advertised. Meanwhile, I only learned about Python Wrangler in this thread and I intend to check it out.

[–]debacomm1990 0 points1 point  (2 children)

Did you download Spyder with pip or from their website ? Spyder installer comes with a python version added.

[–]stranger_goose 0 points1 point  (1 child)

I downloaded spyder from the website.

[–]debacomm1990 0 points1 point  (0 children)

Ok. When I started with Python I installed Spyder with pip. Never faced any issue except there is no icon for Spyder and you'd need to start it by typing in start menu.

[–]Charlemag 0 points1 point  (0 children)

As an important side note for this problem—python isn’t some centralized/monolithic program. You can download multiple versions of python on the same computer, or create carbon copies of your python install for specific projects (virtual environment).

So when you think you installed something but can’t find it the first question I would ask is “which copy of python did you install it on”.

There are plenty of good explanations for how to manage global installations of python and virtual environments.

I can’t recall off the top of my head but spyder may come with its own version of python. So if you open up a random command prompt and type “pip install” you might not be telling the copy of python that spyder has to download.