I am trying to install jaxlib on my windows 10 by the following command which I found on the documentation..
pip install jaxlib
It shows the following error
Collecting jaxlib
Could not find a version that satisfies the requirement jaxlib (from versions: None)
No matching distribution found for jaxlib
Thanks to cloudhan's jax-windows-builder, it is now rather easy to install JAX and jaxlib on windows. E.g.
pip install jax==0.3.13 https://whls.blob.core.windows.net/unstable/cuda111/jaxlib-0.3.7+cuda11.cudnn82-cp38-none-win_amd64.whl
That's all.
As explained there, I had to copy the jaxlib's link address of the whl file I was interested in, i.e. the https://whls.blob.core... above).
But I also had to take care that JAX's version and Jaxlib's were compatible, which compatibility is easy to assess at github.com/google/jax/releases: just pick the last two of each (!)the version numbers! nothing to download from there.
tested with the versions explicited above. I.e. python3.8-64 & jax==0.3.13 & jaxlib-0.3.7
Jaxlib is not supported on windows you can see it here..
https://github.com/google/jax/issues/438
I went through the process the last two days myself so here is what i did:
download and install the latest version of microsoft visual studio (
to get a c++ compiler and toolchain)
download and install python
create a virtual python environment with the packages pip, setuptools, six, wheel and numpy (i did it in the GUI of pycharm)
download jax
open up a windows powershell as administrator, change to the jax directory and complete the following steps (commands are in quotes)
install chocolatey (package manager for easy bazel installation)
Set-ExecutionPolicy Bypass -Scope Process -Force;
[System.Net.ServicePointManager]::SecurityProtocol =
[System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex
((New-Object
System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
install bazel (for building jaxlib)
choco install bazel
install msys2 (linux utilities for bazel)
choco install msys2
permamently link the python environment in your powershell
[System.Environment]::SetEnvironmentVariable("PATH", $Env:Path +
";C:\path\to\venv", "Machine")
still beeing in the jax folder in powershell actually build and compile jax
./build/build.py
after installation execute the command you're ask to to install jaxlib, it's something like
pip install c:\...\jax\dist\jaxlib-0.1.72-cp39-none-win_amd64.whl
and finally install jax with it
pip install -e .
This way it worked for me, since the documentation on the jax homepage utterly confused me.
JAX does not provide jaxlib builds for Windows at this moment of time.
Issue 1, issue 2
But you can build it yourself if you wish.There are some comments in the above issue that might help you.
This worked for me:
powershell -ExecutionPolicy ByPass -NoExit -Command "& 'C:\users\<username>\Anaconda3\condabin\conda_hook.bat' ; conda activate <yourcondaEnvironment>"
Related
I use Python and pycharm as a tool.
If you use the pip statement to install the library, you will get an error.
For example, if I want to download the torch (1.6.0) version and type pip install torch==1.6.0,
It says no version.
This is not the end, but some libraries continue to cause strange conflicts and will not be installed.
For example, if you type pip install poro to install the poro library, an unknown error pops up and the installation fails.
I'm not asking for a pororo installation.
My question is, I want to know how to download the library without relying on pycharm.
I want to download it separately from a site like pypi and put the library directly into the virtual environment (conda).
What should I do?
The following worked for me:
First, install mkl using conda:
conda install -c anaconda mkl
Then run this:
conda install -c pytorch pytorch
The Mac Book Air M1 chip doesn't seem to support pep517 according to the errors of installing third-party libraries with pip or brew. Even using these methods without pep517 downloading the library locally didn't work. How does one circumvent this?
Error from using pip install pandas:
Failed to build numpy
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly
I've tried this:
pip install <lib>
installing the library locally and trying to install with pip without pep517
brew install <lib>
openblas installation of lib
python env on the intel venv
I had the exact same problem, with a different library but with the same error code for PEP 517, I was using python 3.9 at the time, I checked the docs and found out that it's a problem with the python version for the library, downgraded to Python 3.6 and voila! it worked.
Basically try downgrading to Python 3.6 and check.
Installing python libraries through Anaconda seems to work. I simply downloaded the installer and could later use the libraries globally. If someone has a better in-depth explanation, feel free to comment.
I was having the same message when trying to install a different package. I solved by removing the CommandLineTools and installing it again. The steps were:
sudo rm -r /Library/Developer/CommandLineTools
wait for command prompt...
xcode-select --install
This solved the issue for me.
I'm trying to install a package on Python, but Python is throwing an error on installing packages. I'm getting an error every time I tried to install pip install google-search-api.
Here is the error how can I successfully install it?
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/
I already updated that and have the latest version of 14.27 but the problem is throwing the same error.
Go to this link and download Microsoft C++ Build Tools:
https://visualstudio.microsoft.com/visual-cpp-build-tools/
Open the installer, then follow the steps.
You might have something like this, just download it or resume.
If updating above doesn't work then you need to configure or make some updates here. You can make some updates here too by clicking "Modify".
Check that and download what you need there or you might find that you just need to update Microsoft Visual C++ as stated on the error, but I also suggest updating everything there because you might still need it on your future programs. I think those with the C++ as I've done that before and had a similar problem just like that when installing a python package for creating WorldCloud visualization.
UPDATE: December 28, 2020
You can also follow these steps here:
Select: Workloads → Desktop development with C++
Then for Individual Components, select only:
Windows 10 SDK
C++ x64/x86 build tools
You can also achieve the same automatically using the following command:
vs_buildtools.exe --norestart --passive --downloadThenInstall --includeRecommended --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Workload.MSBuildTools
Reference:
https://www.scivision.dev/python-windows-visual-c-14-required
2020 - redist/build tools for Visual C++
silent installs can be done using the following two commands :
vs_buildtools__370953915.1537938681.exe --quiet --add Microsoft.VisualStudio.Workload.VCTools
and
VC_redist.x64.exe /q /norestart
Upgrade your pip with: python -m pip install --upgrade pip
Upgrade your wheel with: pip install --upgrade wheel
Upgrade your setuptools with: pip install --upgrade setuptools
Close the terminal
Try installing the package again.
I tried everything and then finally, downgrading from python 3.10 to 3.9 is what worked. (I noticed it in this comment, but it is a bit different scenario: https://stackoverflow.com/a/70617749/17664284 )
check if no older version of Microsoft Visual C++ are installed. If so uninstall them.
I encounered the above-mentionned problem when using virtualenv. Using conda environment instead solved the problem. Conda automatically installs vs2015_runtime which compiles the wheels with no problem.
In addition to the verified answer by #ice bear, just make sure to reboot your system after downloading and installing the latest visual studio build tools. And then the error you might be getting would go!
Tried Prason's approach. Also tried the fix suggested here
conda install -c conda-forge implicit
pip install --upgrade gensim
here is my error ERROR: Could not build wheels for multidict, which is required to install pyproject.toml-based projects
download whl https://www.lfd.uci.edu/~gohlke/pythonlibs/#multidict
pip install multidict-6.0.2-py3-none-any.whl
pip install httpie
So I was looking around at different things to do on Python, like code for flashing text or a timer, but when I copied them into my window, there were constant syntax errors. Now, maybe you're not meant to copy them straight in, but one error I got was 'no module named wx'. I learned that I could get that module by installing wxPython. Problem is, I've tried all 4 options and none of them have worked for me. Which one do I download and how do I set it up using Windows?
Thanks
It's on PyPI. As of wxPython 4, Python 3 is supported.
Unfortunately, PyPI has a package called wx that is stuck at version 3.0.3; be sure to install the package named wxpython instead.
pip install wxpython
Please note that pip will automatically build wxWidgets for you, but it will not install wxWidgets system dependencies such as GTK and OpenGLu. If the above command exits with an error, look above for a message like this:
checking for <something>... not found
checking for <something>... no
configure: error: <prereq> libraries not available
Error running configure
ERROR: failed building widgets
This should give you information about at least one of the packages your system is missing.
The "official" list of prerequisites from the wxWidgets source is:
dpkg-dev
build-essential
libjpeg-dev
libtiff-dev
libsdl1.2-dev
libgstreamer-plugins-base0.10-dev # or 1.0 if available
libnotify-dev
freeglut3
freeglut3-dev
libsm-dev
libgtk-3-dev
libwebkitgtk-3.0-dev # or libwebkit2gtk-4.0-dev if available
libxtst-dev
The actual package names provided by your package manager may not match these exactly, and to be honest, I don't really know the best way to query a package manager to determine what packages provide the libraries you need.
3 steps to install wx-widgets and pygame in python IDLE
Install python 3xxx in your system opting (Add 3xxx to your path).
open python CLI to see whether python is working or not.
then open command prompt (CMD).
type PIP to see whether pip is installed or not.
enter command : pip install wheel
enter command : pip install pygame
To install wxpython
enter command : pip install -U wxPython
Thats all !!
As per home page instruction:
Make sure you have at least version 6.0.8 of pip and 12.0.5 for setuptools.
Install requirements for Linux as outlined in the readme.rst at:
https://github.com/wxWidgets/Phoenix/blob/master/README.rst
Install wxPython-Phoenix (Linux):
sudo pip install --upgrade --trusted-host wxpython.org --pre -f http://wxpython.org/Phoenix/snapshot-builds/ wxPython_Phoenix
Install wxPython-Phoenix (Windows, use the appropriate script folder):
C:\python27\scripts\pip.exe install --upgrade --trusted-host wxpython.org --pre -f http://wxpython.org/Phoenix/snapshot-builds/ wxPython_Phoenix
I installed wxPython as part of the PsychoPy experiment builder dependencies, and had considerable trouble getting it to install properly as well initially. But this was what worked for me at the end. I use Ubuntu 16.04, python 3.5, pip3 19.0.3
pip3 install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 wxPython --user
If you use Conda then you may easily setup the environment with wx by one line:
$ conda create -n wxenv python=3 wxPython
Solving environment: done
## Package Plan ##
environment location: /home/user/.conda/envs/wxenv
added / updated specs:
- python=3
- wxpython
The following packages will be downloaded:
package | build
---------------------------|-----------------
[...]
Proceed ([y]/n)?
You need to ensure the versions of your wxPython download matches your installed python language library.
The current downloads wxPython downloads doesn't show any libraries built against python 3. I Believe the python 3 porting project is still ongoing.
If you are not sure of what you are doing I would stick with the 32bit version on windows as there are some Python libraries (ie IIRC, MySQLdb) which don't work with 64 bit python.
So you would then need to download python2.7 for windows x86 and "wxPython3.0-win32-py27 32-bit Python 2.7"
To install wxPython GUI library correctly go to the following page (https://wxpython.org/Phoenix/snapshot-builds/), which contains snapshots builds of wxPython library (Phoenix version) depending on your os and version of Python you want to work.
Then when you downloaded the proper package for your system and python version, simply install it by using pip. In my case I've choosen that one (wxPython_Phoenix-3.0.3.dev2811+ecc4797-cp36-cp36m-win_amd64.whl):
pip install wxPython_Phoenix-3.0.3.dev2811+ecc4797-cp36-cp36m-win_amd64.whl
To check that it has been installed sucessfully on the site-packages folder for your current python environment write:
pip freeze
It's all!
Check the version of wxpython and the version of python you have in your machine.
For python 2.7 use wxPython3.0-win32-3.0.2.0-py27 package
The problem was solved in openSuse simply with
zypper in python-wxWidgets-3_0-devel
Trying pip install before, gave me a lot of trouble (missing traits, missing wx/setup.h, https://github.com/wxWidgets/Phoenix/issues/1644, error: aggregate ‘wxGLAttributes _NullGLAttributes’ has incomplete type and cannot be defined, etc.).
wxpython failed to be installed with pipenv. Pipenv is not able to find wxpython binary so it tries to build wxpython but fails.
CXXFLAGS="-I/opt/homebrew/include" pipenv install wxpython
On my macOS M1 pipenv failed to install wxPython. After a lot of searching I found a forum post which really helped me fix the problem.
Source/Credits: https://forums.wxwidgets.org/viewtopic.php?t=47953&p=203709
Install current development version with:
pip install -U https://github.com/robotframework/RIDE/archive/master.zip
(python < 3.9) Install current Beta version (2.0b1) with:
pip install psutil
pip install -U --pre robotframework-ride
Note that I tried to install wxPython with 'pip install -U wxPython' as per instruction
with no avail. Too many errors to list here. 🤨
I found a solution to the problem!!
I'm working on a 64b machine and Windows 11 operating system using VSCode.
Here is the solution using PowerShell:
Version specs:
pip 22.3.1
virtualenv 20.15.1
python 3.10.8
Create a new virtual environment in the directory where the program resides and
activate. There must be no modules installed.
virtualenv venv
venv/scripts/activate.bat
Install the following in sequence:
pip install pygame
(Not sure why pygame must be installed first, but this was
recommended and it works) 😟
pip install -U wxPython
SUCCESS!!! 🤠
These are the modules installed:
numpy 1.24.1
Pillow 9.4.0
pip 22.3.1
pygame 2.1.2
setuptools 65.4.0
six 1.16.0
wheel 0.37.1
wxPython 4.2.0
VSCode still reports wx as a missing module even when you activate the virtual
environment within. Running the code from the PS command prompt within the virtual
environment is the only working solution.
PS. I am sure there are some conflicts when trying to install wxPython within an
environment where all the other modules are installed.
I am trying to install sasl-0.1.3 python package on windows 7 (64 bit machine).
It is fialing wiht C1083 fatal error.
Looks like saslwrapper.cpp is unable to include sasl/sasl.h library in c++ module.
Please help me in resolving the issue. Let me know if you need more details.
I installed python 2.7 on my machine.
The easier way I find to install sasl on windows 7 is to use the pre-compiled version from here : http://www.lfd.uci.edu/~gohlke/pythonlibs/
There is a direct link to the sasl librairies here : http://www.lfd.uci.edu/~gohlke/pythonlibs/#sasl just pick the one you need.
Then you install it using pip :
pip install sasl-0.1.3-cp27-none-win_amd64.whl
Automated install approach
In the interest of getting to high levels of automation, and to hopefully save other users time, the below works also for automated installations. (Substitute a different mirror URL if needed.)
pip install https://download.lfd.uci.edu/pythonlibs/g5apjq5m/sasl-0.2.1-cp37-cp37m-win_amd64.whl
Also, be advised the "cp37" text in the file name is important - you'll want to match this text to the version of python you are using. I am on Python 3.7, which is cp37 (aka CPython 3.7). (More info here.)
As of the time of this post, the available version/platform combinations are:
sasl‑0.1.3‑cp27‑none‑win32.whl
sasl‑0.1.3‑cp27‑none‑win_amd64.whl
sasl‑0.2.1‑cp27‑cp27m‑win32.whl
sasl‑0.2.1‑cp27‑cp27m‑win_amd64.whl
sasl‑0.2.1‑cp35‑cp35m‑win32.whl
sasl‑0.2.1‑cp35‑cp35m‑win_amd64.whl
sasl‑0.2.1‑cp36‑cp36m‑win32.whl
sasl‑0.2.1‑cp36‑cp36m‑win_amd64.whl
sasl‑0.2.1‑cp37‑cp37m‑win32.whl
sasl‑0.2.1‑cp37‑cp37m‑win_amd64.
Automated install of the VS C++ Tools and and sasl at the same time.
The below is a fully-automated install of everything you need.
From an elevated command prompt, install the Choco package manager (if you have not already).
#"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
Install C++ Build Tools
choco install microsoft-visual-cpp-build-tools
Install Sasl
(customize the URL per the above guidance)
pip install https://download.lfd.uci.edu/pythonlibs/g5apjq5m/sasl-0.2.1-cp37-cp37m-win_amd64.whl
My 5 cents for those who use pipenv and want the package be installed on both Linux and Windows, the following worked for me (sasl 0.2.1):
[packages]
...
sasl = {version = "==0.2.1", markers = "platform_system == 'Linux'"}
sasl_win = {version = "==0.2.1", markers = "platform_system == 'Windows'", file = "https://download.lfd.uci.edu/pythonlibs/g5apjq5m/sasl-0.2.1-cp37-cp37m-win_amd64.whl"}
...
See the comment on the corresponding Github issue.