Skip to content Skip to sidebar Skip to footer

How To Fix "could Not Install Packages Due To An Environmenterror: [winerror 123]"?

I'm trying to download a few packages using python 3.8 but every time i try to install packages like sklearn or scipy I get this error: Could not install packages due to an Environ

Solution 1:

I got the same error as you today and even checked this post for assistance!

See, there is a space between your username HP Omen. I removed the space between my username in my Windows and scipy was successfully installed. You can set up a new account as an administrator and modify the name (including the folder name in C:\Users) in the current account. Check the following link for futher assistance on how to modify the current username.

Solution 2:

The real answer is: you shouldn't fix it, Python / package devs should. You should determine the exact package which fails to install and report a bug back to its devs. In your case NumPy is the cause and there's already a bug report for this, as @eorochena says.


As for your problem, it can still happen if you will use an outdated or very recent Python version, for which there's no wheel available for the package. In such case there are two options you could try:

  • Force-install an older package version from the official wheel using the following command:
    pip install --only-binary :all: <failing_package>
    
  • Download unofficial package wheel from here and install it using the following command:
    pip install <path\to\failing_package.whl>
    

Edit: Hmm, that's strange... According to PyPI there was actually an official Python 3.8 wheel available for numpy==1.17.3 at the time you asked... Your log says it was using cached NumPy sources. Maybe you should've tried running it with --no-cache-dir option?

Post a Comment for "How To Fix "could Not Install Packages Due To An Environmenterror: [winerror 123]"?"