Pip Install throws error code 1 - python

Recently switched from MacOSX to a ThinkPad with Windows 10.
Installed Python 3.7, Pip 9
Attempted pip install jupyter and received the following error:
Command python setup.py egg_info failed with error code 1 in
C:\Users\BRIANM~1\AppData\Local\Temp\pip-build-greiazb7\pywinpty\
Uninstalled setup tools, upgraded setup tools, upgraded pip, ran as admin, all the traditional fixes are not working.
Anyone have a fix?

Check that you have installed the 64-bit version of python and try again with
pip3 install jupyter notebook
If it still doesn't work than I would prefer you to use Anaconda it offers the easiest way to install, run and update libraries and packages and virtual environments for windows.
It comes with jupyter notebook pre-installed. On the jupyter notebook doumentation page they also recommend installing it using anaconda

I had the same problem and I found a solution that worked for me. Instead of pip I used: py -m easy_install textract

You should downgrade to python 3.6.5 (after trying all ways you can find on the Internet).
Today, I install python 3.7.0b5 on a new computer(windows 10). Then pip install didn't work with this error code 1. I tried all methods I can find on the Internet. And still stuck here. So I downgrade to 3.6.5 which works well on my mbp. Finally, it works!!!

Related

Python PermissionError(13, 'Permission denied'))': /simple/pytest/ - cannot install packages

I have an issue with installing packages on my WIN11. Until today, I used Python 2.7, which worked, but I upgraded to 3 because I want to use pytest. Now, however, I cannot install packages.
My Python version 3.11.0 and pip version is 22.3. Here is the screenshot of what I see:
What I've tried:
I reinstalled and rebooted
I modified the environmental variables
I ran the cmd prompt as admin
I disabled path length limit too.
I tried pip3 instead of pip.
I tried installing Python to another directory
I tried installing packages in Pycharm
I downloaded the packages manually from pypi and tried installing them
How can I resolve this error?
I found the solution here: stackoverflow.com/questions/71999820/… this is a bug in python. 3.10.4, 30.10, 30.9, 30.8 is not working for me. Only python 3.7.4. I just downgraded to python 3.7.4 and now installing packages works well!

Tensorflow pip install on mac with python3

I know this has been asked many times, I saw them tried to solve my problem but I can't, nothing works for me.
I have a mac m1, My os version is BigSur 11.5.1
My python3 version is 3.8.10
I have a project folder, which I created my env in there as atai_env
I ran pip upgrade, my pip version is current which is 21.3.1
I activated my env and ran pip install tensorflow which gives this error;
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow
I saw some command as pip install tensorflow-macos so I tried it, it seems to install but at the end it gives this Failed to build h5py which I tried to install but failed again
Then I tried to ran pip command given here for python 3.8 -> https://www.tensorflow.org/install/pip and it gives below error;
tensorflow-2.7.0-cp38-cp38-macosx_10_11_x86_64.whl is not a supported wheel on this platform.
I am so sick of this :/ I tried to install other versions of python but it always fails. Can someone explain what should I do, I can't believe I spent more than 2 hours on this.
On the tensorflow install page, it seems I should only be running pip install tensorflow but that doesn't work
Ok, Nothing that I found on google helped. I started over, and decided to try python versions starting from 3.9 with decreasing versions. Finally this command just worked -> pip install tensorflow with python 3.7.9 It is so frustrating, cost me a few hours. I wasn't expecting it would be unstable like this. Anyway, if you happen to face it just try to use one of the version 7 even tho tensorflow says it works for 3.7 - 3.9
PS: I am sorry but this is really stupid, it is almost 2022 and we are working on AI with this framework comon :/
I have MacOS BigSur 11.6.1 running and just created a virtualenv with Python 3.8.12. Installing tensorflow works without any problems:
pip install tensorflow
pip install tensorflow 1 err | 8s | voice_assistant py
Collecting tensorflow
Downloading tensorflow-2.7.0-cp38-cp38-macosx_10_11_x86_64.whl (207.1 MB)
I could successfully install and run TensorFlow from my M1 MacBook Pro. Monterey 12.4. Here's what I did:
1. Install Homebrew first
How typical.
2. Install Anaconda via Homebrew
brew install anaconda
Installing Python is a mess and I know most tutorials will suggest to use pyenv as the version management tools. I tried that, but didn't work. What worked for me is Anaconda.
3. Download PyCharm
It's a GUI-friendly way to switch between Python versions and environments.
4. Set the Python interpreter inside PyCharm
Note that I use Conda Environment. Note also that the conda executable is inside /opt/homebrew/anaconda3/bin/conda.
5. Install tensorflow-macos from the PyCharm terminal
After doing this, you can import tensorflow as tf inside your .py files.
You can try upgrading the version of pip.

Problems installing astra toolbox in Python

I'm trying to install astra-toolbox for python on windows and I'm getting this error.
Anyone have any ideas?
i have tried to install via pip method but it's not working facing the same error as you. if you go to official installation documentation instructions no method to use pip method is given.
i have anaconda installed in my system so i have tried using these commands source:
conda install -c astra-toolbox astra-toolbox
conda install -c astra-toolbox/label/dev astra-toolbox
this solve the issue and astra-toolbox is installed in my system.
PS. this will downgrade package in anaconda. so better to install in separate python environment.

How to download matplotlib for python 3.7 in windows 8?

How do you download matplotlib to windows so I can use it with python?
Every other question related to this that I've found on StackOverflow has led to the same problem which is that it keeps giving me the error:
python setup.py egg_info failed with error code 1 in C:\Users\Myname\AppData\Local\Temp\pip-install-9gc765gs\matplotlib\
Things I have tried (from the command prompt):
pip install matplotlib
pip install matplotlib-1.5.0-cp35-none-win_amd64.whl (which is the file I downloaded from SourceForge and is now stored in my computer)
pip install "matplotlib-1.5.0-cp35-none-win_amd64.whl"
python -mpip install -U matplotlib
I even tried tried:
pip install --upgrade setuptools
python -mpip install -U pip
prior to using the other commands to make sure everything was up to date.
Any help would be very appreciated.
Matplotlib has not been officially released for Python 3.7 yet.
As of this writing, a 3.7 version for Mac and Linux has been uploaded to PyPI earlier today, which means the Windows versions are probably coming very soon. pip will probably work after that.
Similarly, no 3.7 compatible versions have been put onto conda-forge or integrated into the main conda repo yet. I'm sure those will be coming in the next couple of weeks.
Until then, maybe installing from source will work?

PyAudio will NOT install

I've been trying to install PyAudio for a speechrecognition project but for everything I've tried nothing has worked. I tried to install with the latest version of python (3.7) only to noobishly find out that pyaudio isnt compatible with that yet and now im trying with 3.4.
However, whenever I run 'pip install PyAudio' I get an error message saying 'error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).' I have Microsoft Visual C++ 10.0 installed but it just doesn't work.
I'm at my wits end here please help.
(Running Windows 8.1 btw)
A good site to know about is Christoph Gohlke's page "Python Extension Packages for Windows" at https://www.lfd.uci.edu/~gohlke/pythonlibs/.
I ended up solving my own problem by downloading a different version of python, the one that worked for me was Python 3.6.5rc1 (but any 3.6 version seems to work) (Found here: https://www.python.org/downloads/release/python-365rc1/ ) I don't know the full details of why this worked as I'm not the best at this kind of thing yet but it worked when I retried python -m pip install pyaudio(this installed pyaudio successfully)
First upgrade pip to pi3 using following command:
pip3 install --upgrade setuptools pip
and then try with
pip3 install pyaudio
It will install but old versions PyAudio-0.2.11.tar.gz, PyAudio-0.2.11-cp36-cp36m-win_amd64.whl, PyAudio-0.2.11-cp36-cp36m-win_amd64.whl, not support to python 3.7 and after it
Download file from https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio , get the file for your Python version and bitness. Paste the file of interest in location "C:\Users\YOUR_USER_NAME"
Install it with pip install filename.whl

Categories