First, install Anaconda
Installation environment:
Although I’m on a MAC and have Python shipped, I have Anaconda installed first. Because it integrates many third-party Python libraries, and it is easy to manage different versions of Python, switching between different versions of Python. Anaconda is also a scientific computing environment. After Anaconda is installed on your computer, you will have some common libraries installed as well as Python installed.
The author installed Python version 2.7 Anaconda, and after installing Anaconda, Python and some common libraries are already installed. In addition, the Spyder was installed automatically.
2. Establish, activate and install Pytorch
Open the terminal and type:
conda create -n [name] python=3.5
[
n
a
m
e
]
[name]
Replace [name] with the name of the environment you want, without typing []. Depending on your needs, you can choose between different versions of Python. Just change 3.5 to 3.6 or 2.7
Then, after the completion of the execution, the execution:
source activate [name]
At this point, the runtime environment is activated.
Then execute PIP install torch torchvision
to perform Pytorch installation.
When finished, the installation is complete
If you need to use the GPU version, install it using the source code. Download or visit the page making, others have been compiled Pytorch GPU version of https://github.com/TomHeaven/pytorch-osx-build
Read More:
- Configuration (9) to solve the problem of “setup tools PIP wheel failed with error code 1”, create virtual environments with Python of anaconda
- (Solved) pytorch error: RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED (install cuda)
- Anaconda builds a new environment and installs sklearn, numpy and other modules
- Installing PyQt4 in Windows + Python 3.6
- This application failed to start because it could not find or load the Qt platform plugin “windows”.
- Pychar configures Anaconda environment
- Python: What’s Virtualenv
- Installing gensim in Anaconda
- Anaconda + vscode usage problem summary
- Pysot installation and model testing
- The python version output from the command line is inconsistent with the python version in the current CONDA environment
- CONDA creating virtual environment and common CONDA commands
- Import any QT binding error during installation of evo
- tensorflow import error: DLL load failed: The specified module could not be found (DLL load failed: The specified module could not be found)
- Tensorflow import error: DLL load failed: the specified module could not be found
- Anaconda create environment, delete environment, activate environment, exit environment
- Incomplete and “the Jupiter” distribution was not found
- ERROR: Could not find a version that satisfies the requirement tensorfolw==1.14
- Processing method of PIP exception no module named ‘pip’
- No matching distribution found for tensorflow