I am trying to install the boost library as shown here (see section install Boost from Shayne Fletcher:
http://www.amazon.com/review/R2QLTSQPKTFW5Z/ref=cm_cr_pr_cmt?ie=UTF8&ASIN=0470987847#wasThisHelpful
However I already have installed the 64 bit version of Anaconda for Python 2.7.5. So when I follow the instructions above I get the similar linking errors to the OP experienced in the post below:
Cannot successfully install Boost.Python
The OP resolved the issue be removing the 64 bit version and replacing it with the 32 bit version.
However I wondered if I could install both versions and switch between them, it seems that generally speaking you can:
Anaconda Python 32-bit is trying to load Anaconda 64-bit libraries
to-load-anaconda-64-bit-libraries
However that sill leaves the question of how the boost library will know how to use the correct version and where to find it?
Or in my case would I still be better off removing the 64 bit version completely and installing the 32 bit version in its place?
I am doing the build in visual studio 2008.
If you install the 32-bit version of Anaconda, you can conda install boost.
As for how to switch between them, you will need to modify your PATH environment variable.
If you are using 64-bit version.
Open Anaconda prompt in Admin mode and run the following command
conda install -c anaconda boost
It will automatically resolve environment
Related
I use
(1) Windows 11,
(2) Python 3.7.8 for 64bit ;
Python 3.8.3 for 32bit
(3) Visual Studio Code.
I noticed that all my python packages are installed on 32Bit, is there any way to get my packages works on 64bit as well? Because I wish to use Pytorch, however, it only works on 64bit
I tried to install packages again, but it installed for my 32 bit? So it cannot install again?
I checked my system path but I have no idea how to do with path for my packages?
I also installed PyTorch in Visual code, but it does not appear installed in my python environment...Why?
I tried to install PyTorch by pip and it gives me error as below:
Updates: ------------------------------------------------
I tried: Ctrl+Shift+P, select that 64bit python
Then, in the terminal I tried to install packages, it still shows that my package is already installed...
You have selected Python3.7.8(64) in the jupyter notebook, while you have installed the python modules in the Python3.8.3(32) environment. So it will prompt No module named 'pandas'.
And looks like torch has no 32bit version, if you want to use it, you need to select Python3.7.8(64).
So, you can activate the terminal first through open a python file and then clicking the python interpreter on the bottom-right of the VSCode or choosing Python: Select Python interpreter in the command palette directly.
Then take the shortcut of Ctrl+Shift+` to create a new terminal with the activated python environment. After this, you can install the modules in the right place.
You can refer to the official docs for more detail.
ERROR: Shapely-1.6.4.post2-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform.
I cannot install Shapely with:
pip install "C:/path.../Shapely-1.6.4.post2-cp36-cp36m-win_amd64.whl
This is what I have tried so far:
* pip install --upgrade pip
* Python version 3.6.4, Windows 64 bit
Should I be installing another version? cp36 and win_amd64 looks correct. Unless amd means the CPU? In that case I have Intel i5. I don't see that version so I don't think that's it...
Any other suggestions on what I am doing wrong?
EDIT: Downloaded wheel from here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely
There's a helpful complete guide here to do so. Windows have many problems with python wheel files. If you want my advice, you better don't use Windows for python programming, Linux is perfect for such a thing. You can use Ubuntu which is great and stable.
If you really want to program python in Windows, I suggest you to install and use Anaconda. It's a great tool and helps you with installing python packages and programming in python.
EDIT: I tried the Anaconda way and it works fine. After installing Anaconda I opened Anaconda Powershell Prompt as admin (cause there was permission problem for me in installing Shapely!) and then ran the command conda install shapely. Once installation completed, I ran the command jupyter notebook and in jupyter I was able to use Shapely.
I installed the Shapely in the base environment of conda which is not good. If you want use Anaconda, you better learn how to manage environments in conda.
I'm using Windows and my default python version is:
python --version
Python 3.6.5 :: Anaconda, Inc.
Unfortunately, Gurobi is choosing 2.7 for installation.
How to install it with python 3.6?
You are in good shape because you have anaconda installed on windows. If you follow the instructions you will have gurobi installed with your version of python. As of today, the instructions are
conda config --add channels http://conda.anaconda.org/gurobi
conda install gurobi
If you still have trouble, read on. From reading your question, it looks like you might also have gurobi installed separately but in your path. This is probably OK as long as it is the same version of gurobi or if the anaconda distribution is ahead of the gurobi installation. Also, if you used the setup.py or pip to try to install gurobi, you might run into trouble from mixing pip and conda. In the worst case, it might be easiest just to delete and reinstall conda.
I'trying to update spacy from version 2.0.18 to version 2.1.1.
But every time I try to run the command
pip install spacy-nightly
or
pip install -U spacy==2.1.1
I just get
error: [WinError 2] System cannot find file specified
msvc
py_compiler msvc
with a lot of unreadable output.
Now I figured it has something to do with the C++ compiler spacy uses and I installed like every package I found at the Microsoft Visual Website but my problem didnt solve itself.
I really would appreciate some help!
Most probably, you are on a 64-bit machine using a 32-bit python executable.
Remove the 32-bit version of python and Install the 64 bit version of python it will work.
If you where working within a virtualenv, then delete the virtualenv and recreate it again after installing the 64-bit of python.
I have decided to learn generic algorithms recently and I needed to install Tensorflow package. Tensorflow run on python 64 bit only, so i install python 3.5.0 64 bit without uninstalling python 32 bit. because i was afraid to lose my packages on python 32 bit by uninstalling it. The problem is how can i force pip install to install a package on my python 64 bit version instead of 32 bit version.
If you have actually managed to install both x64 & x32 packages, you could simply do
C:\path\to\corresponding\python.exe -m pip install <package>
This will ensure you use the correct pip and install the package for the specific python instance.
Starting with Python 3.3, coexistence is made much easier with the Python Launcher for Windows. (Also see PEP 397.) From the command line you can use "py" or "pyw" in place of "python" or "pythonw". The py command allows you to specify the revision and version of python to run. For example, open a command window and type in "py -3". This runs the latest revision of python 3 available and defaults to the 64 bit version if it is available. On the original poster's system, entering this command will start the python 3.5-64 bit interpreter.
This command can also be used to run the correct version of pip without knowing the exact path to the python version you want to install to. "py -3.5 -m pip install [package]" will install [package] to the 64 bit version of python3.5.
If you have both the 64 and 32 bit versions installed and ever need to install to the 32 bit version, you have to enter both the major and minor revision numbers as part of the command and add '-32' to the command argument. "py -3.5-32 -m pip install [package]" will install to the 32 bit version.
If you do have both the 64 and 32 bit versions installed and need to install a 32 bit version package only, you have to enter the target -t (32 bit Lib) with pip3, e.g. install bitcoin lib:
pip3 install -t C:\Users\
max\AppData\Local\Programs\Python\Python36-32\Lib bitcoin
I have both 64 and 32 bit python environments on my machine.
To build targeting 32 bit or 64 bit, i edit the environment variables setting the PATH for the whole python installation and one environment variable pointing to the scripts area, where pyinstaller is.
.....\Continuum\anaconda3_32bit
.....\Continuum\anaconda3_32bit\Scripts
or
.....\Continuum\anaconda3
.....\Continuum\anaconda3\Scripts
The I run pip install pyinstaller (which uses the PATH to find the required versions of PIP and pyinstaller).
The app must have been built using the correct python environment as well.
As an additional solution it's good to know that windows (or any) operating system looks for apps firstly in current directory then check path environment variable. So it's a good idea to place preferred python version's path to first position in path env variable.
Or simply replace the old pythons's path with new one.
There's nothing much you can do. I also had this issue. The best thing to do is to change your python path and install the packages on the 64 bits python.