No preset version installed for command virtualenv - python

I tried to create a virtual environment for python installed from asdf:
It gave me this error:
virtualenv whatsapp-bot ─╯
No preset version installed for command virtualenv
Please install a version by running one of the following:
asdf install python 3.10.7
or add one of the following versions in your config file at
python 3.10.4
python 3.9.12
I have tried to search for the issue with no solution.

After reading some other related issues, I found the documentation located at:
Documentation
So what was needed was to reshim
asdf reshim python
That solved it!

Related

Does "pipenv install requests" work with python 3.9.2?

I am following a guide to get NLTK working on my computer and part of the process is setting up a virtual environment so I can manage packages across projects.
Here is the guide I'm following: https://docs.python-guide.org/dev/virtualenvs/
I run into an issue when I reach the part where I'm supposed to "pipenv install requests". I get the message Installing...Failed to load paths: No Python at 'c:\users\[username]\appdata\local\programs\python\**python38**\python.exe'
I have python 3.9.2 installed so my path is c:\users\[username]\appdata\local\programs\python\**python39**\python.exe. Therefore, the python38 directory does not exist, nor does the path in my environment variables.
Do I need to install 3.8.8 to be able to follow this guide? If so, can I install 3.8.8 while 3.9.2 is installed as well, or Can I switch between the two versions? should I just uninstall 3.9.2 and work with 3.8.8?
Thank you.
You might need to specify a python version for pipenv, you can do that with: pipenv --version 3.9, you can read more about specifying the version here: https://pipenv.pypa.io/en/latest/basics/#specifying-versions-of-python

Problem installing tensorflow in virtual environment

This issue in some form has come up before, however I am having a variant of this issue.
I had python 3.8 installed. Tensorflow does not have a version for this python.
I therefore installed python 3.7 and set up a virtual environment using virtualenv.
In visual studio code I even updated the settings json "python.pythonPath": to the correct path for version 3.7 of python.
I install the correct version of tensorflow using the correct link for 3.7 on the site:
'''pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.1.0-cp37-cp37m-manylinux2010_x86_64.whl'''
But i still get the error
"ERROR: tensorflow_cpu-2.1.0-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform."
When i type python -V I still get Python 3.8.1, could this mean I am not correctly using the virtual environment?
However I have now set up virtual environment using anaconda which is limited to 3.7 and it still says 3.8 when using "python -V" and i get the same error when trying to install.
You can try to either reinstall anaconda, visual studio, or type in the command "pip install --upgrade tensorflow". This should work without the link.
After creating the virtual environment you need to activate it if you haven't already. Once you do, your command line prompt should indicate that a new version of Python, in your case 3.7 is now running.
I ended up using Anaconda with Python 3.6, it seems tensorflow would not work for 3.7 on windows.

Virtualenv error, unable to create process

I recently cleaned up my system variables and I think I might have mixed something up. I have two versions of Python installed: 3.4 and 3.6.2. One is situated in C:/Python3.4 and the other one in AppData folder. I wanted to use Python 3.6.2 and virtualenv again to create another working environment, but I get the following error:
Fatal error in launcher: Unable to create process using '"'
If I try using pip, everything works fine and virtualenv is installed.
Happenned to me today.
I solved it by uninstalling python and installing Python x86 in C:\Python\Python37_32 FOR ALL USERS
Then I've added C:\Python\Python37_32 and C:\Python\Python37_32\Scripts to the PATH env variable.
Then using cmd I installed virtualenv with pip install virtualenv.
After that virtualenv worked like a charm.
Hope this helps
I tried almost all measures I can search on Google. But I solved this issue by re-install certifi pip install certifi

virtualenv not setting virtual environment

in debian based Linux i am trying to uninstall a package installed by pip but for removing it after search it says it will only uninstall it in virtual environment after install virtualenv and upgrading it to version 15.0.3 i run command
virtualenv --no-site-packages /usr
then error occured that it is being run by interpreter and please use system python to execute the script
then i changed the python version via -p flag to python3 then it says the same msg that already using the python3 interpreter i also used simple python version still no luck
i trolled the stackoverflow & google but got no valid answer
Finally after searching and experimenting a lot I just owerwrited the new version of twisted by downloading the old one some of the files it did not deleted however all packages in the system started using newly downloaded old version of twisted!

Virtualenv not installing correctly

I had Python 3.4 running on my Windows 8.1 system during which time virtualenv used to work correctly.
Due to some requirements not working on 3.4, I downgraded my Python version to Python 2.7.6 by cleanly uninstalling Python 3.4 from C:\Python34 and installing 2.7 in C:\Python27.
Post install of python, I installed pip and used pip install virtualenv to install virtualenv for 2.7. However, whenever I run virtualenv in my command prompt, I'm faced with the following error:
sh.exe": /c/Python34/scripts/virtualenv: No such file or directory
How do I fix this so that virtualenv uses python 2.7.6 instead of 3.4?
My first hunch is to check your PATH variable:
https://superuser.com/questions/502358/easier-way-to-change-environment-variables-in-windows-8
and see if that is still pointing to a now non-existent install. Every time I've installed python on windows, I've had to manually set that, so I wouldn't assume the uninstall would fix it automatically.
Another way is to install both python 27 and 34 at different folders. You can add 27 folder to system path, and use 34 locally. If you have eclipse with pydev or other IDE tool, just configure pythonpath variable to the corresponding version that you want to use.

Categories