I have installed one version of python a while ago, that was version 3.9.6. I recently installed version 3.11.1 as I am once again using python. I am trying to follow a tutorial on a webscraper and when I try to import the package "requests bs4" using the command python -m pip install requests bs4 I am told that the requirement is already satisfied. This is true that I have it installed in version 39, so my question is how do I direct pip to install it in the newest version of python that I currently have installed.
I tried to mess with the path by deleting version 39 off my path leaving only 311 but when I repeat the command above it returns that the same error as above. Ive looked at other problems very similar to mine but none quite the same, so when I try the solutions for others it doesn't quite work for me.
I am using windows 11
While downloading pip install allennlp==1.0.0 allennlp-models==1.0.0, I faced this problem:
[6 lines of output]
running bdist_wheel
running build
running build_py
running build_ext
building 'srsly.msgpack._unpacker' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for srsly
Failed to build thinc blis srsly
ERROR: Could not build wheels for srsly, which is required to install pyproject.toml-based projects
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
I have downloaded:
pip install -vvv torch
pip install numpy
pip3 install --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
and it still not working.
I am using Python 3.10.2 on Windows 11 Pro.
What should I do?
I had Python 3.10 and had the same error installing psutil from pip. I fixed the problem by installing an older version of pip using the command:
pip install pip==21.3.1
You have to install the Python 3.9.10 version from python.org and after installation, upgrade your pip and everything will be sorted.
It is the problem in Python 3.10.2... This method is working. I was suffering from the same problem in installing the turtle, so I did that and error was solved.
This particular error is caused by not having a C/C++ compiler installed. As said in the error message, either install MSVC or another compiler to compile it.
Please read your error messages; they are there for a reason.
If you're using a Python 3 image, this might help:
RUN apk update
RUN apk add make automake gcc g++ subversion python3-dev
Reference from Problems with pip install numpy - RuntimeError: Broken toolchain: cannot link a simple C program
https://visualstudio.microsoft.com/visual-cpp-build-tools/
Download and install or update
Microsoft Visual C++ 14.0 or greater is required.
You must be install build visual tools 15, 17, 19, or greater.
Download from Microsoft C++ Build Tools.
To solve this problem, you need to download Visual Studio from its main page.
If Visual Studio is already installed, then when you run the installer, you can modify it (by clicking the modify button):
During Visual Studio installation (or installation modification) choose Desktop Development with C++:
First: You installed the Mingw-w64 compiler with a full MSYS2 package, and this package included Python.
Second: you get the error because the plugin is not in the Python packages installed by MSYS2.
So: uninstall MSYS2 and install a minimalistic MinGW (MinGW - minimalistic GNU for Windows).
And finally Install a version of Python from the official Python page.
Now if you can install plugins.
I've found a similar question from GitHub, and credits goes to thaibee. Here I quote:
It's a problem with Microsoft products and is
very easy to solve.
If you can't install these plugins as well,
need to download it from other repositories like this one:
https://www.lfd.uci.edu/~gohlke/pythonlibs/ depends on the version of python and the system.
For example: for my Windows 11 (x64) and Python 3.10 I took this file: pyodbc‑4.0.32‑cp310‑cp310‑win_amd64.whl
It's very easy to install: pip install pyodbc‑4.0.32‑cp310‑cp310‑win_amd64.whl
After it, the system works well and didn't ask you about VC.
This solution I found in problem with the MySQL plugin for Django. I don't understand why - but they also use VC for the installation process.
I understand your problem, and I have faced it too. I tried multiple solutions, but it didn't work, so I simply uninstalled my Python and installed some older version of it. Example: I recently uninstalled Python 3.10.2 and installed 3.9.10.
It worked without any errors.
I had a similar problem while installing with pip3: building wheel for box2d-py (setup.py) ... error
The solution was just to install SWIG prior to box2d, so I added the following steps manually:
pip install swig
pip install gym[box2d]
For Mac, there is a possible workaround for this problem if you use Conda. The idea is to create an x86 environment on the Mac and do your pip install after that.
conda create -n <name>
conda activate <name>
conda config --env --set subdir osx-64
conda install python=3.8
Here I choose Python 3.8, but you can choose another version.
If you are on macOS (maybe Apple silicon) then first try to do this from your base location of the terminal:
eval "$(/opt/homebrew/bin/brew shellenv)"
Then, do brew update and brew upgrade.
Once you are done with that, type
brew install geos
Now again go to your virtual environment and activate it (if you are working in the virtualenv) and then type:
python3.10 -m pip3 install [module name]
I was facing the same problem when executing:
python -m pip install package-name
After many failed tentatives, what fixed the problem for me was executing:
py -m pip install package-name
When I type py in the terminal, it shows this information:
Python 3.9.8 (tags/v3.9.8:bb3fdcf, Nov 5 2021, 20:48:33) [MSC v.1929 64 bit (AMD64)] on win32
When I type python in the terminal, it shows this information:
Python 3.8.2 (default, Apr 9 2020, 13:17:39) [GCC 9.3.0 64 bit (AMD64)] on win32
I believe that this problem is related to the Python interpreter version.
I tried all recommendations that were written, but none worked. My Python was 3.11.
So I just installed Python 3.8.10 from here:
https://www.python.org/downloads/release/python-3810/
And ran
C:\Python38\python.exe -m pip install matplotlib
And it worked.
I faced a similar problem while installing pandas-datareader.
I was using Python 3.11.0, and after trying all possible solutions, I downloaded Python 9.10.0 and it worked fine.
We can install DVC with the below commands:
conda install -c conda-forge mamba # installs much faster than conda
mamba install -c conda-forge dvc
For more information please refer this: https://dvc.org/doc/install/
The recommended method for installing orion-ml is via pip (e.g., pip install orion-ml) as stated in the github README.md
However, this simple command causes the error
INFO: pip is looking at multiple versions of baytune to determine which version is
compatible with other requirements. This could take a while.
Collecting baytune<0.3,>=0.2.3
Using cached baytune-0.2.4-py2.py3-none-any.whl (27 kB)
Using cached baytune-0.2.3-py2.py3-none-any.whl (27 kB)
INFO: pip is looking at multiple versions of mlblocks to determine which version is
compatible with other requirements. This could take a while.
INFO: This is taking longer than usual. You might need to provide the dependency resolver
with stricter constraints to reduce runtime. If you want to abort this run, you can press
Ctrl + C to do so. To improve how pip performs, tell us what happened here:
https://pip.pypa.io/surveys/backtracking
INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine
which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of orion-ml to determine which version is
compatible with other requirements. This could take a while.
ERROR: Cannot install orion-ml because these package versions have conflicting dependencies.
The conflict is caused by:
mlprimitives 0.2.4 depends on tensorflow<2 and >=1.11.0
mlprimitives 0.2.3 depends on tensorflow<2 and >=1.11.0
mlprimitives 0.2.2 depends on tensorflow<2 and >=1.11.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
This tells us there is a version conflict. How can I resolve this? Thank you
I ran into the same issue and found out that orion-ml only worked with Python >=3.6, <3.8, but I had Python 3.9.2 installed which ended up pullig orion-ml 0.1.0 which is a very old version. I uninstalled 3.9.2 and installed a version under Python 3.8 and it worked
Install Anaconda:
https://www.anaconda.com/products/individual#download-section
Create a virtual environment with python version 3.7.(3.8.8 python makes an error installing "pip install orion-ml")
Run your python 3.7 virtual env.
pip install orion-ml : There's no error install "orion-ml" package.
Create a separate conda environment like:
conda create --name orion python=3.7 # or 3.6
conda activate orion
and then install tensorflow using:
pip install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.8.0-py3-none-any.whl
This will get you rid of the tensroflow error.
I am trying to install allennlp via pip on the latest version of macOS Catalina. The Python version is 3.9.0. The pip version is 20.2.4.
I was just able to install only a couple of weeks ago, but now I receive the following error when I run the command:
pip3 install allennlp allennlp-models
ERROR: No matching distribution found for torch<1.8.0,>=1.6.0 (from allennlp)
This is really bad because a time-sensitive project I am working on right now completely depends on allennlp working. I needed to reinstall due to some git issues, and my virtual env was reset. What can I do to resolve this issue?
Thanks.
EDIT: Somehow I ended up uninstalling 3.9 in homebrew and now I'm stuck at jsonnet. It errors out. I saw some posts about this issue, but none of the recommendations work.
EDIT2: I tried reinstalling brew's python 3.9. jsonnet standalone works again, but then I have the pytorch issue again.
I'm stuck in a loop. Neither the system macOS 3.8 python nor the latest 3.9 home-brew python works. I'd rather get the home-brew python working, but there's no valid version of torch available for that one apparently.
Do NOT accidentally use home-brew to download the latest Python 3.9. That isn't compatible with a lot of the required libraries.
Phew.
I've been trying to figure this all day and I've reached many dead-ends so I thought I reach out to the fine people here # stackoverflow.
Here's what I'm working against. I've had Python 3.5.1 installed into a Linux (Linux [xxx] 2.6.9-42.0.2.ELsmp #1 SMP Thu Aug 17 17:57:31 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux) server I don't, or didn't at the time, have root access to. For what ever reason PIP was not included in the installation of Python (even though ever posting I've found about installing PIP for Python >3.4 insists it's installed by default).
I've tried installing installing PIP by using GET-PIP.py, but attempts to run get-ip.py gives a long run of errors (I can provide the errors, if it makes difference).
I've tried installing PIP by using ensurepip, but I'm blocked by the following error:
python -m ensurepip
Ignoring ensurepip failure: pip 7.1.2 requires SSL/TLS
even though I have OpenSSL installed,
openssl version
OpenSSL 0.9.7a Feb 19 2003
Unfortunately, I am stuck here. I don't know why PIP wasn't included in the Python 3.5.1 build, but I need to correct this. Any advise would be appreciated.
Dan
I get the exact same probelm and searching for solutions here.
You can try yum install pip