![]() However, on a Debian 9 it require a few more steps: sudo apt install python3-venvĬreate your virtual environment: python -m venv ~/scrapyenvĪctivate your virtual environment: source ~/scrapyenv/bin/activate ![]() On a CentOS system, virtualenv for Python 3 is installed with Python. ![]() Scrapy will be installed in a virtualenv environment to prevent any conflicts with system wide library. This is the recommended installation method. Install Scrapy Inside a Virtual Environment Use this method only if your system is dedicated to Scrapy: sudo pip3 install scrapy System-wide installation is the easiest method, but may conflict with other Python scripts that require different library versions. Install Scrapy System-wide Installation (Not recommended) Sudo ln -s /usr/bin/python3 /usr/bin/pythonĬheck you use the proper version with: python -version Replace the symbolic link /usr/bin/python that link by default to a Python 2 installation to the newly installed Python 3: sudo rm -f /usr/bin/python Sudo yum install python34 python34-pip gcc python34-devel On a CentOS system, install Python, PIP and some dependencies from EPEL repositories: sudo yum install epel-release Install pip, the Python package installer: sudo apt install python3-pip Update-alternatives -install /usr/bin/python python /usr/bin/python3.5 2Ĭheck you are using a Python 3 version: python -version Change it with: update-alternatives -install /usr/bin/python python /usr/bin/python2.7 1 ![]() On Debian 9 Systemĭebian 9 is shipped is both Python 3.5 and 2.7, but 2.7 is the default. On most systems, including Debian 9 and CentOS 7, the default Python version is 2.7, and the pip installer need to be installed manually. If you’re not familiar with the sudo command, see the Users and Groups guide. Commands that require elevated privileges are prefixed with sudo. This guide is written for a non-root user. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |