Is there a procedure to install Theano for Python 3.4 64bit on Windows 7, manually, without using any of the bundles?
I wrote a step by step tutorial on this today, check it out at:
http://www.islandman93.com/2015/04/tutorial-python-34-theano-and-windows-7.html
Some specifics from my post:
As user2805751 said, you'll need LibPython, Numpy, and Scipy.
You'll also need: MinGW http://mingw-w64.yaxm.org/doku.php/download
Installing Theano with python setup.py install will automatically do the 2to3 conversion.
If the above PR doesn't work, I was able to get the following working for windows 8.1 64 bit (python 2.7.8, but you might try 3.4)
http://pavel.surmenok.com/2014/05/31/installing-theano-with-gpu-on-windows-64-bit/
I needed to also install the LibPython package from http://www.lfd.uci.edu/~gohlke/pythonlibs/#libpython inorder to fix an ld linker problem.
There is no such instruction. There is a new PR with instruction that do not use any bundles, but it is for python2. You can try it, but change python2 for python3:
https://github.com/Theano/Theano/pull/2155
Related
I have the following environment:
Windows 10
Python 3.8.10
MATLAB R2020b
I'm trying to install matlabengine (pip install matlabengine) package, and I'm getting the following error:
RuntimeError: No compatible MATLAB installation found in Windows Registry. This release of MATLAB Engine API for Python is compatible with version 9.13. The found versions were 9.9
What am I missing ? (according to https://pypi.org/project/matlabengine/) it seems I'm using the right versions.
How can I check the versions I have (9.9 or 9.13 because as I wrote above I have MATLAB R2020b and Python 3.8.10).
The error is about the MATLAB version, not the version of matlabengine (the Python module).
You wrote that you have MATLAB 2020b. That is the release name for MATLAB version 9.9, as can be seen in this table on Wikipedia.
As can be read on the description of matlabengine 9.13.1, this engine version requires MATLAB release R2022b (= 9.13).
To use matlabengine with MATLAB 2020b, install version 9.9.1:
python -m pip install matlabengine==9.9.1
You need to try all versions of MATLAB engine starting from the latest one going backwards. What worked for me on Ubuntu was
$ python -m pip install matlabengine==9.12.17
NB: To get a list of all the possible versions, try install one that doesn't exist e.g.
$ python -m pip install matlabengine==9.9.2
and it will give you an error with the list of possible versions.
You can try to install specific version of matlabengine.
pip install matlabengine==9.13.1
If they cannot find your version, you might need to update pip.
Also, you can check your current matlabengine version.
pip show matlabengine
I'm building some C++ Python extensions for Python 3.10 (using PyBind11) but I'm finding that when trying to import these extensions I get: ImportError: Python version mismatch: module was compiled for Python 3.8, but the interpreter version is incompatible: 3.10.5.
I have find_package(Python3 3.10 REQUIRED) in my CMakeLists.txt and I use -DPYTHON_EXECUTABLE:FILEPATH=$(which python) when running cmake. I can confirm that which python points to a Python 3.10 executable. When running cmake part of the output says:
Found Python3: /PATH/TO/venv/bin/python3 (found suitable version "3.10.5", minimum required is "3.10") found components: Interpreter
and there are no other mentions of finding some other Python version. The compiled files look like module.cpython-310-x86_64-linux-gnu.so. Because of the 310 they can only be imported into a Python 3.10 interpreter sesion.
BUT, when I try importing them I get the ImportError I mentioned above. On the other hand, if I manually rename the compiled files to module.cpython-38-x86_64-linux-gnu.so and open up a Python 3.8 interpreter, I'm able to import.
How can I fix this? Why are all the clues suggesting that I have built the files correctly when I somehow haven't?
Note that I have already tried the solutions from the answers here.
There may have been other factors at play here (like including 3rd party CMake projects) so to fix my problem the first step was to remove those. Then I:
changed my find_package(Python3 3.10 REQUIRED) to find_package(Python3 3.10 REQUIRED COMPONENTS Interpreter Development) (see here). User #Tsyvarev also somewhat alluded to this in his comment on my question.
installed sudo apt install python3.10-dev (I only had this for Python 3.8). If you're like me and don't understand the difference between sudo apt install python and sudo apt install python-dev see this answer.
I am trying to install a specific version of numpy using the command pip install numpy=1.19.1 in a python virtual environment. But I am getting the following errors
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly
How do I solve this? I am using Python 3.9.6 and Pip 21.1.3. And I am on macOS Big Sur.
I was facing the same error on my MacBook Air(macOS BigSur) Laptop while installing the Numpy package via integrated terminal of VS Code. And I found the solution:
So previously I was using older version of pip i.e. 19.2.3.
But when I upgraded it to the latest version using command
pip install --upgrade pip
and after that when running the command
pip install numpy
it worked absolutely fine.
At the time running the above commands, my python version was 3.8.2.
I think NumPy is not yet being prepared for Python 3.9 since they need to check a lot of times. You should try Python 3.7 or 3.8 is better.
See this thread: https://github.com/numpy/numpy/issues/17569
Edit: Based on the latest news on numpy's website (dated 31st December) Numpy appears to now be supporting python 3.9 and 3.10 as well
If you're on Windows, then install Visual Studio 2019 Build Tools, then go to 'Individual components', then tick the latest version of 'Windows 10 SDK', and 'MSVC v142 x64/86 build tools - Latest'. That solved this error for me, except for me this error came when installing discord.py.
Try seeing if it works with Python 3.8 first though, just like Dhananjay's answer. That could save you a lot of storage, because Visual Studio takes up lots of space. If that doesn't work, you can try my answer.
Edit: I just realised, you said you're on Mac. Try this:
type python -VV in terminal
It should say something like this:
Python 3.9.6 (default, Jun 29 2021, 10:19:25)
[GCC 10.3.0]
Whatever it says on the second line is what you will need to install. I use Python on Ubuntu 21.10 on WSL2, which uses GCC 10.3.0, and I have GCC 10.3.0 installed.
Similarly to the answers above, switching to Python 3.8 solved the issue. Additionally, because of this issue, I couldn't install scikit-image which depends on numpy.
I created a virtual environment of Python 3.8 using conda i.e. conda create -n py38 python=3.8 to switch python version. I have Mac M1, 2020 updated to OS Monterey, version 12.0.1.
yea, I was also using python 3.10 and switched back to python 3.8.
check this link python/downloads to download python 3.8
I went to http://nipy.org/dipy/installation.html and install nibabel, then I when I wanted to install dipy, there where 2 problems:
Wheel was not built
and vcvarshall.bat not found.
What I did ?
Install Setuptools in site-pakcages
download Setuptools-34.3.1-py2.py3-none-any.whl (md5) and save in site-packages
I also try
python setup.py install --compiler=mingw32รง
and
If you get an error saying unable to find vcvarsall.bat then you need to create a file called pydistutils.cfg in notepad and give it the contents
[build]
compiler=mingw32
But setup.py de system it did not find, and I still have vcvarshall.bat not found.
what I need to do?
I am using, Windows 7, Python 3.5.1 and Anaconda 2.5.0 (64 bit)
You will almost certainly find it easier to install third-party packages if you adopt virtual environments. When done correctly you will then not need admin privileges to install packages into virtualenvs. The HitchHikers' Guide to Python contains more information about this.
The vcvarsall.bat is, I believe, a part of the Visual Studio (the Express version is available at no cost) environment. It's required when you are trying to build a compiled Python extension as described in this article. I'm not sure how that will play with mingw.
So, I installed via ANACONDA but , when I go to python, and I want to import dipy it says: No modle named dipy
Solved ! Well I had python 3.5 and dipy has some issues with that version, so I installed Anaconda with python 2.7 , installed visual c++9 and follow the steps on the web !
Not sure what I'm doing wrong but when I run pycrypto-2.6.win-amd64-py3.3.exe I get Python 3.3 is required, which I have just installed before I tried to install the crypto. I should also note that I have VS 2013 installed, as I'm reading that I may need to compile the whole thing or something.
Anyway, as an option I have a Fedora installed on a Virtual Box, not sure how use it though but if it is "easier" on Fedora I can try to install it there.
I'm actively searching for a solution but am short on time and would like some help. Thanks.
You probably installed 32bit version of Python - install 64bit version.
pycrypto-2.6.win-amd64-py3.3.exe is binary package which means it's already compiled so you don't need compiler to install it. If compilation were needed you would have to have the same version of Visual C++ which was used to build Python itself; in case of the official Python 3.3 that's Visual C++ 2010 not 2013. See What version of Visual Studio and/or MinGW do I need to build extension modules for a given version of Python? question for more details.