I ran command prompt as administrator then typed pip install pycrypto and got this error message:
Command ""c:\program files (x86)\python37-32\python.exe" -u -c "import setuptools, tokenize;file='C:\Users\Berkay\AppData\Local\Temp\pip-install-yikt7auh\pycrypto\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\Berkay\AppData\Local\Temp\pip-record-rjhqqr19\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Berkay\AppData\Local\Temp\pip-install-yikt7auh\pycrypto\
For easily installing python packages on windows install miniconda.
1.Open search and search for anaconda as follows:
2.Click on Anaconda Prompt, this will open a Anaconda command line for windows as given below:
For installing pycrypto write the command
conda install -c anaconda pycrypto
as given here. In this way pycrypto is installed using conda in windows environment:
To execute a script using anaconda in windows, first get the current working directory used by conda on your system using:
import os
os.getcwd()
This will give the current working directory.
Then come out of python compiler into anaconda command line using:
import sys
sys.exit()
Put your code in current working directory as shown below:
Now execute this code using anaconda command line as shown below:
This concludes the tutorial for installing packages and compiling python code using conda on windows.