I have been trying to install the supplychainpy python package and have been getting the following error in the cmd terminal:
Error:
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.32.31326\bin\HostX86\x64\cl.exe' failed with exit code 2
The python version I am using is 3.8.8 and I have tried the following resolutions:
creating a virtual environment in anaconda
uninstalling and reinstalling python and MSVC Build Tools
using different python versions
repairing/updating pip and setup tools
My coworkers have gotten the package installed with no issues but I have had no luck. Let me know if anyone else has had this issue/how to solve it.
I was previously running into environment inconsistencies after downloading tensorflow with pip in a conda environment, and after several hours of frustration, decided deleting anaconda/miniconda and python and starting from scratch would be my best option to get python working again (The inconsistencies were causing a plethora of issues with loading other modules like numpy, etc).
After downloading Python version 3.9.10 directly from https://www.python.org/downloads/macos/, I wanted to see if I could start using Python again in a Jupyter notebook in VS Code. When I try to run a simple print('hello world') in a python chunk I (unsurprisingly) get the following error:
Jupyter cannot be started. Error attempting to locate jupyter: Running cells with 'Python 3.9.10 64-bit' requires notebook package.
Run the following command to install 'jupyter and notebook' into the Python environment.
Command: 'python -m pip install jupyter notebook -U'
I was pretty much expecting this error, since I knew I had deleted all packages when deleting Anaconda and Python.
However, when I try running python -m pip install jupyter notebook -U in the terminal I ultimately get the following error:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> psutil
note: This is an issue with the package mentioned above, not pip.
Any help or insight is greatly appreciated! I am on MacOS (M1) if that is useful information.
The problem seems to be with the python3 distribution that comes with MacOSX Command Line Tools. Well, at least that same error was gone after following these steps.
So, to fix the problem I installed python3.9 (I presume you can change 3.9 to your desired version, e.g. 3.8 or 3.10) using Homebrew.
Install Homebrew (to check if it's installed already just type brew --version in the terminal):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install python3.9
brew install python#3.9
Create your virtual environment
python3.9 -m venv myvenv
Activate the virtual environment with source myvenv/bin/activate
Finally, install Jupyter using
(myvenv) pip install jupyter notebook
I have the same problem when installing the Jupyter notebook on MacOS 12.5 M2 chip. It turns out that the error is caused by not having GCC on my mac to run the wheel for installing the psutil package because for some reason I removed my XCode from my Mac. So I installed XCode from AppStore and opened XCode after the installation to agree to its terms and conditions. After Xcode went through the setup process I tried pip install jupyter again and it worked well.
In my case, I just opened the XCode, accept the terms and the installation proposed, and tried to install the jupyter again and it worked!
It seems to be very particular about the version of python installed. I set up a fresh installation on a new box this morning and put 3.11 on there. pip install jupyterlabs gave me the same error as you got. I then uninstalled python and installed an earlier version, and now it works.
PS the older version that worked for me is 3.10.8
I'm trying to install eth-brownie. Followed the Brownie documentation and installed pipx, then ran pipx ensurepath. I was originally using Python 3.10 but couldn't install it, found that this was pretty common and the best fix was to downgrade to 3.9.
After uninstalling 3.10 and installing 3.9, I ran everything again. When I run pipx install eth-brownie, I get the following error:
C:\Users\garri>pipx install eth-brownie
No Python at 'C:\Users\garri\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe'
Fatal error from pip prevented installation. Full pip output in file:
C:\Users\garri\.local\pipx\logs\cmd_2022-03-28_13.40.53_pip_errors.log
Error installing eth-brownie.
I removed Python 3.10 from Path and python --version returns 3.9.12 as expected. I'm at a loss, as I feel like I've tried everything. Any help would be greatly appreciated.
This is basically a pipx cache issue. You have to delete the following folder to remove pipx related cached files.
C:\Users\<username>\.local\pipx
I installed Python 3.9 and when in cmd I use python3 --version it gives python 3.10.2.
It could be the reason for WinError 5 access denied when I try to install tensorflow?
You most likely installed multiple Python versions. Open up your cmd, run where python3, delete the ones you don't want.
I am trying to install pocketsphinx package ***dependent package of textract*** on windows. I'm getting the the following error
'Failed to build wheel for pocketsphinx'
Has anyone come across this error. Help is appreciated.
Thanks
I could resolve this by downgrading python 3.6 to 3.5.