virtualenv

Getting syntax error while using virtualenv package in Ubuntu 16.04

Getting syntax error while using virtualenv package in Ubuntu 16.04 Question: I am running Ubuntu 16.04 in VMware virtual environment. When I try to install virtualenv, I am facing issues. What I did: sudo apt install python3-pip sudo pip3 install virtualenv virtualenv –version The last command is showing this: Traceback (most recent call last): File …

Total answers: 1

how to downgrade python3.8.10 to 3.5.6 on ubuntu via the terminal?

how to downgrade python3.8.10 to 3.5.6 on ubuntu via the terminal? Question: In order to install older version of keras, tensorflow 1.10.0 is needed. That should solve compatibility issues with an algorithm I am trying to run. TO be able to install these older versions of tensorflow and keras and older version of python is …

Total answers: 1

Python versions are not changing despite activating virtual environment in WSL2

Python versions are not changing despite activating virtual environment in WSL2 Question: Background: In WSL2 (ubuntu 20.04) I created a python virtual environment inside a directory. Using the command python3 -m venv venv my system’s python version was set to python3.11 (after downloading) via sudo update-alternatives –config python3 and then choosing the version. I noticed …

Total answers: 2

Can't install pandas (and numpy) in virtual environment

Can't install pandas (and numpy) in virtual environment Question: So, recently I decided to try using venv for my new django project. I’m following some tutorials, but now I’m facing a problem – I can’t install Pandas package. I installed django via Windows PowerShall without problems, but after I tried to install pandas with that …

Total answers: 2

Inserting cli options into virtualenv.cli_run within a python file

Inserting cli options into virtualenv.cli_run within a python file Question: Problem Code Picture I want to write a Python script that creates a new virtual environment with the following virtualenv CLI options: –app-data APP_DATA (a folder APP_DATA for the cache) –seeder {app-data,pip} If I give those two as strings in a list (see picture) I …

Total answers: 2

what is activate file in flask and what are other activate.bat activate.ps1 and others

what is activate file in flask and what are other activate.bat activate.ps1 and others Question: I am new to flask, in some tutorial i saw using something like /Scripts/activate in linux and in other tutorial i saw /Scripts/activate.ps1 what are those activate.ps1 activate.bat and how they differ from activate file. are all those only for …

Total answers: 1

Import "flask" could not be resolved Pylance

Import "flask" could not be resolved Pylance Question: I am getting this missing import error. I tried installing flask and flask alchemy again but it says requirement satisfied Asked By: Syed Ashiq || Source Answers: Did you install the module? You can do this by for example by writing pip install flask in your command …

Total answers: 1

how to call an ipython within virtualenv?

how to call an ipython within virtualenv? Question: Good time of the day, everyone! The problem is the following: I create virtualenv using the command python3 -m venv env (my python version 3.8.9) I activate it . ./env/bin/activate Install ipython: pip install ipython Try to run it ipython, but instead of invoking my virtualenv’s ipython, …

Total answers: 1

Cannot import 'flask' in python

Cannot import 'flask' in python Question: I am using the following code: from flask import Flask, jsonify, request However, I get an error from the word "flask": Import "flask" could not be resolved I tried this answer to reinstall the "flask" package but still got the error. How can I fix this error? Appreciate if …

Total answers: 2