I want to install jupyter on Win 10. I have been using python on linux, but this is my first time on Win 10.
when I execute python -m pip install jupyter on administrator, I got errors like this:
The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.
This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand. Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.
any idea?
I have been able to get around this error by installing Anaconda, uninstalling Python 3.8.0 and installing Python 3.7.5 instead.
The Jupyter installation then ran successfully when I executed pip install jupyter with Git Bash in my C:\ drive using pip 19.2.3 (the default with Python 3.7.5).
For those who encounter this and need to use Python 3.8+, make sure to update you setuptools to version 42.0.0 (or later).
Install a version earlier than python 3.8 and the installation will work. Use CMD.
I had the same problem, I am using 64-bit windows 10 but downloaded the 32-bit python installer because it is the default that appears on the 'downloads' page on the python.org site. Uninstalled python 3.8.1, downloaded the 64-bit installer instead, and then ran 'pip install jupyterlab' using the pip version 19.2.3 that got installed with the 64-bit python instead of upgrading to pip version 19.3.1. So if you are running a 64-bit version of windows, make sure you download the 64-bit python installer!
I am trying to install lxml with Python (32 bits) 3.5.1, on Windows 7 64 bits. I tried pip install lxml, but I got the famous error for missing "vcvarsall.bat". If I try to Install visual studio 2015, it requires 6 GB of free space, which I do not have available at the moment, and I'd rather not install a package which I do not plan to use.
I tried downloaded the wheel as suggested here and here, but I still get the whl file "is not a supported wheel on this platform". Wheel and pip are upgraded to the latest versions. What am I missing...?
I have been struggling with this today. I found, elsewhere on stackoverflow.com, this two-part and quick solution, which resulted in python no longer complaining when I tried to use lxml:
go to this repository and download a version which matches your Python installation (the version number, and 32- vs 64-bit. I use Python 3.5.1 64-bit, installed on Windows 10, so on that page, I chose lxml-3.6.0-cp35-cp35m-win_amd64.whl. You say you use the 32-bit version, so use a version that matches that.
My download directory is d:\Downloads. Python must be in your PATH environment variable for the next step to work. Use a command like the following, changing "D:\Downloads" to the pathname to your download directory. Then, at a DOS prompt, type:
python -m pip install "D:\Downloads\lxml-3.6.0-cp35-cp35m-win_amd64.whl" lxml-3.6.0-cp35-cp35m-win_amd64.whl
I am having major issues with this install. Please provide a detailed, step-by-step guide.
These instructions are for Windows7 or Windows8 with Python3.3.
However, they should work for various versions as the releases of python and other respective prerequisites change/evolve:
Install Python3.3:
Download the last release of Python3.3 (currently 3.3.5) from the downloads page HERE
Direct link for Win32 MSI installer -> HERE
Simply run the MSI to install python. It will register itself in the registry, and appear in Add/REmove Programs.
NOTE: my instructions that follow assume that you choose to install python to the default path of C:\python33\ when asked during the Python Installation Wizard
Add the C:\python33\ and C:\python33\scripts folders to the system path by adding those directories to the PATH environment variable from the Control Panel > System > Advanced System Settings link (Advanced Tab) > Environmental Variables (Button).
Install OpenSSL:
Download Win32 OpenSSL page from HERE for your version of Windows and PC architecture
Download Visual C++ 2008 redistributables for your version of Windows and PC architecture
Download OpenSSL for your version of Windows and architecture (the regular version, not the light one)
Add the c:\openssl-win32\bin (or similar) directory to your PATH, the same way you added C:\python33 and C:\python33\scripts above.
Install Setuptools (get-pip.py should install Setuptools for you), but, just in case...
Download ez_setup.py HERE and save it in C:\python33\scripts
Run C:\python33\scripts> python ez_setup.py
Install PIP
Download get-pip.py from HERE and save it in C:\python33\scripts
Run C:\python33\scripts> python get-pip.py
Install LXML
Download LXML 3.3.3 from HERE for your version of Windows and PC architecture
Run the EXE file
I think I'm too stupid for installing LXML Lib on my System.
Please can anyone help me with instructions for stupid people?
I found a lot of instruction, but they did not help me much.
I looked at LXML-Homepage
For installation I need pip 1.4.1? I downloaded it... But, how can I install it?
Unzip pip-1.4.1.tar.gz
Then I opened the setup.py with my Python Shell.
Run the modul:
Traceback (most recent call last):
File "C:\................\dist\pip-1.4.1\setup.py", line 5, in <module>
from setuptools import setup, find_packages
ImportError: No module named 'setuptools'
Ok.. now I thought I need setuptools...
Downloaded setuptools-1.4.1-py2.py3-none-any.whl
Unziped it.. run the easy_install.py with my python shell
SystemExit: error: No urls, filenames, or requirements specified
Same error if started in windows command console.
What should I do?
If you on Windows, why not to use binary packages with normal installers?
You can find them on this page: http://www.lfd.uci.edu/~gohlke/pythonlibs/
You can also use anaconda. Once you have it installed (http://continuum.io/downloads) you can just run conda install lxml to install lxml. It's also very useful for packages like numpy and scipy, which can sometimes be a pain to install on Windows.
These instructions are for Windows7 or Windows8 with Python3.3 specifically as the original poster requested. However, they should work for various versions as the releases of python and other respective prerequisites change/evolve:
Install Python3.3:
Download the last release of Python3.3 (currently 3.3.5) from the downloads page HERE
Direct link for Win32 MSI installer -> HERE
Direct link for Win64 MSI installer -> HERE
Simply run the MSI to install python. It will register itself in the registry, and appear in Add/REmove Programs.
NOTE: my instructions that follow assume that you choose to install python to the default path of C:\python33\ when asked during the Python Installation Wizard
Add the C:\python33\ and C:\python33\scripts folders to the system path by adding those directories to the PATH environment variable from the Control Panel > System > Advanced System Settings link (Advanced Tab) > Environmental Variables (Button).
Install OpenSSL:
Download Win32 OpenSSL page from HERE for your version of Windows and PC architecture
Download Visual C++ 2008 redistributables for your version of Windows and PC architecture
Download OpenSSL for your version of Windows and architecture (the regular version, not the light one)
Add the c:\openssl-win32\bin (or similar) directory to your PATH, the same way you added C:\python33 and C:\python33\scripts above.
Install Setuptools (get-pip.py should install Setuptools for you), but, just in case...
Download ez_setup.py HERE and save it in C:\python33\scripts
Run C:\python33\scripts> python ez_setup.py
Install PIP
Download get-pip.py from HERE and save it in C:\python33\scripts
Run C:\python33\scripts> python get-pip.py
Install LXML
Download LXML 3.3.3 from HERE for your version of Windows and PC architecture
Run the EXE file
Download lxml based on your version dependencies from here,
http://www.lfd.uci.edu/~gohlke/pythonlibs/djcobkfp/lxml-3.4.4-cp27-none-win32.whl # replace lxml version based on your dependencies..
http://www.lfd.uci.edu/~gohlke/pythonlibs/
and open your command prompt open lcoation Downloads or where file Downloaded in cmd..
that install using,
pip install lxml-3.4.4-cp34-none-win_amd64.whl # this is eg name may vary based on your python or lxml version.
I've read every other google source and SO thread, with nothing working.
Python 2.7.3 32bit installed on Windows 7 64bit. Download, extracting, and then trying to install PyCrypto results in "Unable to find vcvarsall.bat".
So I install MinGW and tack that on the install line as the compiler of choice. But then I get the error "RuntimeError: chmod error".
How in the world do I get around this? I've tried using pip, which gives the same result. I found a prebuilt PyCrypto 2.3 binary and installed that, but it's nowhere to be found on the system (not working).
Any ideas?
If you don't already have a C/C++ development environment installed that is compatible with the Visual Studio binaries distributed by Python.org, then you should stick to installing only pure Python packages or packages for which a Windows binary is available.
Fortunately, there are PyCrypto binaries available for Windows:
http://www.voidspace.org.uk/python/modules.shtml#pycrypto
UPDATE:
As #Udi suggests in the comment below, the following command also installs pycrypto and can be used in virtualenv as well:
easy_install http://www.voidspace.org.uk/python/pycrypto-2.6.1/pycrypto-2.6.1.win32-py2.7.exe
Notice to choose the relevant link for your setup from this list
If you're looking for builds for Python 3.5, see PyCrypto on python 3.5
After years and years, python finally agreed for a binary disribution called wheel which allows to install even binary extensions on Windows without having a compiler with simple pip install packagename. There is a list of popular packages with their status. Pycrypto is not there yet, but lxml, PySide and Scrapy for example.
Edited Nov 2015: pip uninstall pycrypto & pip install pycryptodome. It is a pycrypto fork with new features and it supports wheel. It replaces pycrypto, so existing code will continue to work (see https://pycryptodome.readthedocs.org/en/latest/src/examples.html)
Microsoft has recently recently released a standalone, dedicated Microsoft Visual C++ Compiler for Python 2.7. If you're using Python 2.7, simply install that compiler and Setuptools 6.0 or later, and most packages with C extensions will now compile readily.
For VS2010:
SET VS90COMNTOOLS=%VS100COMNTOOLS%
For VS2012:
SET VS90COMNTOOLS=%VS110COMNTOOLS%
then Call:
pip install pyCrypto
In general
vcvarsall.bat is part of the Visual C++ compiler, you need that to install what you are trying to install. Don't even try to deal with MingGW if your Python was compiled with Visual Studio toolchain and vice versa. Even the version of the Microsoft tool chain is important. Python compiled with VS 2008 won't work with extensions compiled with VS 2010!
You have to compile PyCrypto with the same compiler that the version of Python was compiled with. Google for "Unable to find vcvarsall.bat" because that is the root of your problem, it is a very common problem with compiling Python extensions on Windows.
There is a lot of information and a lot to read to get this right on whatever system you are on with this link.
Beware using Visual Studio 2010 or not using Visual Studio 2008
As far as I know the following is still true. This was posted in the link above in June, 2010 referring to trying to build extensions with VS 2010 Express against the Python installers available on python.org.
Be careful if you do this. Python 2.6 and 2.7 from python.org are
built with Visual Studio 2008 compilers. You will need to link with
the same CRT (msvcr90.dll) as Python.
Visual Studio 2010 Express links with the wrong CRT version:
msvcr100.dll.
If you do this, you must also re-build Python with Visual Studio 2010
Express. You cannot use the standard Python binary installer for
Windows. Nor can you use any C/C++ extensions built with a different
compiler than Visual Studio 2010 (Express).
Opinion: This is one reason I abandoned Windows for all serious development work for OSX!
PyCryptodome is an almost-compatible fork of PyCrypto with Windows wheels available on pypi.
You can install it with a simple:
pip install pycryptodome
The website includes instructions to build it from sources with the Microsoft compilers too.
I have managed to get pycrypto to compile by using MinGW32 and MSYS. This presumes that you have pip or easy_install installed.
Here's how I did it:
1) Install MinGW32. For the sake of this explanation, let's assume it's installed in C:\MinGW. When using the installer, which I recommend, select the C++ compiler. MSYS should install with MinGW
2) Add c:\mingw\bin,c:\mingw\mingw32\bin,C:\MinGW\msys\1.0, c:\mingw\msys\1.0\bin and c:\mingw\msys\1.0\sbin to your %PATH%. If you aren't familiar, this article is very helpful.
3) From the search bar, run msys and the MSYS terminal will open. For those familiar with Cygwin, it works in a similar fashion.
4) From within the MSYS terminal pip install pycrypto should run without error after this.
For Windows 7:
To install Pycrypto in Windows,
Try this in Command Prompt,
Set path=C:\Python27\Scripts (i.e path where easy_install is located)
Then execute the following,
easy_install pycrypto
For Ubuntu:
Try this,
Download Pycrypto from "https://pypi.python.org/pypi/pycrypto"
Then change your current path to downloaded path using your terminal and user should be root:
Eg: root#xyz-virtual-machine:~/pycrypto-2.6.1#
Then execute the following using the terminal:
python setup.py install
It's worked for me. Hope works for all..
For those of you looking for python 3.4 I found a git repo with an installer that just works. Here are the direct links for x64 and x32
Try just using:
pip install pycryptodome
or:
pip install pycryptodomex
Source: https://pypi.python.org/pypi/pycryptodome
If you are on Windows and struggling with installing Pycrypcto just use the:
pip install pycryptodome.
It works like a miracle and it will make your life much easier than trying to do a lot of configurations and tweaks.
It's possible to build PyCrypto using the Windows 7 SDK toolkits. There are two versions of the Windows 7 SDK. The original version (for .Net 3.5) includes the VS 2008 command-line compilers. Both 32- and 64-bit compilers can be installed.
The first step is to compile mpir to provide fast arithmetic. I've documented the process I use in the gmpy library. Detailed instructions for building mpir using the SDK compiler can be found at sdk_build
The key steps to use the SDK compilers from a DOS prompt are:
1) Run either vcvars32.bat or vcvars64.bat as appropriate.
2) At the prompt, execute "set MSSdk=1"
3) At the prompt, execute "set DISTUTILS_USE_SDK=1"
This should allow "python setup.py install" to succeed assuming there are no other issues with the C code. But I vaaguely remember that I had to edit a couple of PyCrypto files to enable mpir and to find the mpir libraries but I don't have my Windows system up at the moment. It will be a couple of days before I'll have time to recreate the steps. If you haven't reported success by then, I'll post the PyCrypto steps. The steps will assume you were able to compile mpir.
I hope this helps.
So I install MinGW and tack that on the install line as the compiler
of choice. But then I get the error "RuntimeError: chmod error".
This error "RuntimeError: chmod error" occurs because the install script didn't find the chmod command.
How in the world do I get around this?
Solution
You only need to add the MSYS binaries to the PATH and re-run the install script.
(N.B: Note that MinGW comes with MSYS so )
Example
For example, if we are in folder C:\<..>\pycrypto-2.6.1\dist\pycrypto-2.6.1>
C:\.....>set PATH=C:\MinGW\msys\1.0\bin;%PATH%
C:\.....>python setup.py install
Optional: you might need to clean before you re-run the script:
`C:\<..>\pycrypto-2.6.1\dist\pycrypto-2.6.1> python setup.py clean`
Go to "Microsoft Visual C++ Compiler for Python 2.7" and continue based on "System Requirements" (this is what I did to put below steps together).
Install setuptools (setuptools 6.0 or later is required for Python to automatically detect this compiler package)
either by: pip install setuptools
or download "Setuptools bootstrapping installer" source from, save this file somwhere on your filestystem as "ez_python.py" and install with: python ez_python.py
Install wheel (wheel is recommended for producing pre-built binary packages). You can install it with: pip install wheel
Open Windows elevated Command Prompt cmd.exe (with "Run as administrator") to install "Microsoft Visual C++ Compiler for Python 2.7" for all users. You can use following command to do so: msiexec /i C:\users\jozko\download\VCForPython27.msi ALLUSERS=1 just use your own path to file: msiexec /i <path to MSI> ALLUSERS=1
Now you should be able to install pycrypto with: pip install pycrypto
My answer might not be related to problem mention here, but I had same problem with Python 3.4 where Crypto.Cipher wasn't a valid import. So I tried installing PyCrypto and went into problems.
After some research I found with 3.4 you should use pycryptodome.
I install pycryptodome using pycharm and I was good.
from Crypto.Cipher import AES
This probably isn't the optimal solution but you might download and install the free Visual C++ Express package from MS. This will give you the C++ compiler you need to compile the PyCrypto code.
So I install MinGW and tack that on the install line as the compiler of choice. But then I get the error "RuntimeError: chmod error".
You need to install msys package under MinGW
and add following entries in your PATH env variable.
C:\MinGW\bin
C:\MinGW\msys\1.0\bin [This is where you will find chmod executable]
Then run your command from normal windows command prompt.
Step 1: Install Visual C++ 2010 Express from
here.
(Do not install Microsoft Visual Studio 2010 Service Pack 1 )
Step 2: Remove all the Microsoft Visual C++ 2010 Redistributable packages from Control Panel\Programs and Features. If you don't do those then the install is going to fail with an obscure "Fatal error during installation" error.
Step 3: Install offline version of Windows SDK for Visual Studio 2010 (v7.1) from here.
This is required for 64bit extensions. Windows has builtin mounting for ISOs like Pismo.
Step 4: You need to install the ISO file with Pismo File Mount Audit Package. Download Pismo from here
Step 5: Right click the downloaded ISO file and choose mount with Pismo. Thereafter, install the Setup\SDKSetup.exe instead of setup.exe.
Step 6a: Create a vcvars64.bat file in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64 by changing directory to C:\Program Files (x86)\Microsoft Visual Studio version\VC\ on the command prompt.
Type command on the command prompt:
cd C:\Program Files (x86)\Microsoft Visual Studio version\VC\r
Step 6b:
To configure this Command Prompt window for 64-bit command-line builds that target x86 platforms, at the command prompt, enter:
vcvarsall x86 Click here for more options.
Step 7: At the command prompt, install the PyCrypto by typing:
C:\Python3X>pip install -U your_wh_file
I had Pycharm for python.
Go to pycharm -> file -> setting -> project interpreter
Click on +
Search for "pycrypto" and install the package
Note: If you don't have "Microsoft Visual C++ Compiler for Python 2.7" installed then it will prompt for installation, once installation finished try the above steps it should work fine.