Python Pip broken: error sys.stderr.write(f“ERROR: {exc}”) - python

Good morning everyone,
MacBook Air 2017.
I am new to code, and I have just started to learn a few lines of Python. I had installed version 3.8 a few months ago, and now I have started learning a bit more seriously. I found out about the pip command, but trying to install the docx pip through "pip install python-docx" showed me an error.
To be completely honest, I started to watch on the internet how to fix this problem, but I didn't really understand what I was doing. I tried to install Pyenv to somehow correct the error by making Python 3.9.4 the default version for the Mac, following this website https://opensource.com/article/19/5/python-3-default-mac. I tried to modify the .bash trough "touch ~/.bash_profile; open ~/.bash_profile", hoping this would somehow fix the issue following How do I edit $PATH (.bash_profile) on OSX?. In the end, I just decided to uninstall both 3.8 and 3.9.4 to somehow start again through https://apple.stackexchange.com/questions/284824/remove-and-reinstall-python-on-mac-can-i-trust-these-old-references, but nothing happened. At this moment in time, I have no clue what happened and if somehow I have made things even worse (which I probably did).
Right now, whenever I use any command with pip an error comes up, and I don't know how to fix it in order to be able to use modules & pip in Python. The error could be the same as the following one that I have attached to the post, which comes up after writing commands in terminal:
Image with a few errors
Thanks a lot, Bye.

Related

tried to install spleeter, got miniconda, then anaconda, then python, then it broke and I wanna start over

Please help I don't know anything about code or anything. I just wanna install spleeter but got and made great progress with the million steps of troubleshooting. Now I wanna delete miniconda, anaconda and python. I went to finder to delete the python folders, then i typed in the code that's supposed to delete miniconda, then anaconda, but it wouldn't stop telling me "ValueError: bad marshal data (unknown type code)" google says that this indicates a python corruption so i told it to downgrade, this didn't work, i tried to put it back, it didn't work
this is so frustrating i just wanna purge it all and try again. It's the only stuff I've ever done with this so if there's like a nuke button, that'd be best

Pip Fatal Error in launcher: Unable to create process when using ""

I already fixed this, but I will post the question anyways and answer it so if there are other people having this issue they may find this.
I installed blender a while ago and did some stuff using python. I can't recall what exactly I did, it was for a school project. However, when I recently tried to use pip to install something I got the following message:
Error in launcher: Unable to create process when using "path to python my blender folder"
Even if you get this answer due to another situation my solution might still help you.
This worked for me:
First I uninstalled Blender.
Then I uninstalled python and reinstalled the newest version.
I deleted every environment variable path I could find leading to an old python version.
In the Terminal I entered where pip and still got some paths leading to old python versions, I went to these locations and deleted every folder labeled with an old python version, in my case these locations were C:\Python37and C:\Users\myusername\Appdata\Roaming\Python
And that's it. After that pip worked as it should.

How to resolve Error Starting Kernel in JupyterLab

I know there are a lot of similar questions, that have already been solved out there, but the solutions are a bit too complex for me.
Long story short, I am not good at installing things and getting them up and running at all. Took me months to work out how to install JupyterLab.
But I finally did it! and I even set up a piece of Batch code to launch it in my current directory.
C:\anaconda3\python.exe C:\anaconda3\cwp.py C:\anaconda3\ C:\anaconda3\python.exe C:\anaconda3\Scripts\jupyter-lab-script.py "%CD%"
However, now I am getting this error
Error Starting Kernal
Is there a simple way to address this issue? Do I just need to move my kernel script to the right folder? Add something to redirect the batch file to find the kernel?
Run this command to fix the error
python -m ipykernel install --user

Anaconda install, basic usage issues

everyone. I installed anaconda to use python and install ai packages. I am new to high-level computer use beyond the normal GUI that windows has blessed us with.
Background: I am just starting using command prompts and am teaching myself python to use for ai with keras and tensorflow. Unfortunately, I cannot get far enough to install these packages because after I install anaconda, I get multiple errors in the command prompt. Access Denied was solved by installing for all users and running as administrator. However, I cannot use conda, and when I use pip, I get constant html errors. Nothing works. I tried adding \Anaconda3 and \Anaconda3\Scripts to PATH, but it doesn't change anything. The prompt starts by telling me that it cannot find the specified paths then kicks me over to C:\Windows\system32, but when I cd back to my \Anaconda3 directory, nothing changes. What am I doing wrong? What do I need to try?
I appreciate it. As basic as this is, rest assured I spent days struggling with this before posting.

Spyder cannot find module named 'pandas_datareader'

First off I would like to say that I am aware that this question has been asked before, however, none of the other posts have offered a solution that resolves the problem.
I am trying to use pandas-datareader to grab stock prices from the internet. I am using windows with python version 3.6. I first installed pandas-datareader from the console using
pip install pandas-datareader.
I then wrote a code which used the line
import pandas_datareader.data as web
It came back with the error
`ModuleNotFoundError: No module named 'pandas_datareader'
I tried to redownload pandas-datareader, just in case it didn't work the first time, but the console came back with "Requirement already satisfied" so that wasn't the problem.
From there I uninstalled pandas-datareader, and reinstalled it with
pip3 install pandas-datareader
I still got the same error message.
I was worried that it might have something to do with old versions of python installed on my computer so I deleted all files for python 2.7, but this did not help the issue. I restarted spyder and my computer and this did not help. I tried Jupiter notebook and this did not help either.
Now to take my investigation one step further, I looked in my file folders at the hidden files to see where pandas-datareader could be hiding. When I go to C:\Users\J.Shepard\Anaconda3\pkgs and C:\Users\J.Shepard\Anaconda3\pkgs I see that pandas-0.23.0-py36h830ac7b_0 is installed but I cannot find anything that looks like pandas-datareader. In fact, when I search for "pandas-datareader" in my file search, I only see 2 text files with one line of code each. I do not know what to make of this discovery but I thought it might be helpful to someone else.
I hope that I have made a good case to prove that I have genuinely tried and failed to solve this problem on my own. Based on the number of other unresolved posts related to this same question, I believe that this is a question that deserves to be asked again.
I tried conda install pandas-datareader in Anaconda Prompt. It was installed and after my computer restarted, pandas-datareader worked in spyder 3.6.

Categories

Resources