When I tried to create virtualenv with python3.7 (
virtualenv -p /usr/local/bin/python3.7
on one of my fresh VPS I faced
no module name '_ctypes'
You should perform these steps to fix it:
sudo apt-get update
sudo apt-get install libffi-dev
If you still have same error then you probably installed python3.7 by yourself from source codes. If so just repeat this installation:
cd /usr/src
wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz
sudo tar xzf Python-3.7.4.tgz
cd Python-3.7.4
sudo ./configure --enable-optimizations
sudo make altinstall
:hint
if you have more than one cpu core, then you can speed up
make stage by:
sudo make altinstall -j <number_of_cores>
:hint
cat /proc/cpuinfo
- shows you the information about your CPUs
Комментариев нет:
Отправить комментарий
Если Вы нашли ошибку у автора, у Вас есть вопрос или просто хотите поделиться чем-то полезным, то пишите - не стесняйтесь..