venvs | venvs creates virtualenvs | Build Tool library
kandi X-RAY | venvs Summary
kandi X-RAY | venvs Summary
venvs
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Yields venv config and venv
- Returns the version of python
- Add a new virtualenv
- Check for duplicate links
- Runs a virtualenv
- Write the given module to the given file
- Install packages into a virtualenv
- Link source to destination
venvs Key Features
venvs Examples and Code Snippets
Community Discussions
Trending Discussions on venvs
QUESTION
I'm trying to install eth-brownie using 'pipx install eth-brownie' but I get an error saying
...ANSWER
Answered 2022-Jan-02 at 09:59I used pip install eth-brownie and it worked fine, I didnt need to downgrade. Im new to this maybe I could be wrong but it worked fine with me.
QUESTION
I'm attempting to write a test fixture based on randomly generated data. This randomly generated data needs to be able to accept a seed so that we can generate the same data on two different computers at the same time.
I'm using the pytest parse.addoption
fixture (I think it's a fixture) to add this ability.
My core issue is that I'd like to be able to parameterize a randomly generated list that uses a fixture as an argument.
...ANSWER
Answered 2022-Mar-23 at 00:01After doing some more digging I ran into this documentation around pytest-cases
QUESTION
VSCode wouldn't show venvs created with poetry in "change kernel" window.
I tried this thread but it didn't work. As well as the topic being 2 years old.
Eventhough I would like to avoid installing all the dependencies in local folder for each project (one of the suggested answers), I still tried it but VSCode doesn't see it either (.venv folder created inside the project).
Right now poetry saves all the venvs in: ~/.cache/pypoetry/virtualenvs
after poetry shell
any of the venvs. I added it to settings.json with
ANSWER
Answered 2022-Mar-09 at 22:51You should end your path with a forward slash, like "/home/gobsan/.cache/pypoetry/virtualenvs/"
.
I was just researching Poetry and VSCode and ended up doing this as well.
Here's my own path and what my interpreter looks like after the settings update
QUESTION
I see this issue posted alot...but no solutions thus far have worked for me (sorry about the repost).
PROBLEM I'm trying to run flask on my windows10 machine, and am unable to load a simple hello.py without a 404 error.
DEBUGGER The debugger is working for syntax errors (I can see the lines from hello.py file in my browser if I break the syntax in the file...but I'm getting no help on the 404 if the py file doesn't contain errors. The terminal also detects changes to the file it's supposed to load on the screen.
(I take it this means that the venv is set up properly, and the issue lies in the network handlers on windows..)
Things I've done I've tried.
- Disabling all the firewalls
- Restarting the machine (countless times)
- netstat -aon to confirm my ports are being used by another service.
- Uninstalling and reinstalling python
- Setting up new venvs on different drives on my machine
- allowing all permissions in windows for all users and guests prior to creating the virtual environment.
- installing xampp and setting up ports for apache => flask run --port:PORT
- Uninstalling xampp
- sitting and crying in the corner of the shower with water running on my face
Code for hello.py
'''
...ANSWER
Answered 2022-Feb-25 at 20:20You did not wrote the decorator for the index Function the right way.
This is a fixed Version who should work:
QUESTION
I have created a package feed in Azure DevOps. Everything was working until pip version 22.0 was released.
Now when I try to install package from this feed using pip==22.0
...ANSWER
Answered 2022-Jan-30 at 20:45Please look at the rest of the error message.
QUESTION
Macbook Pro : Monterey
Intel Core i7
Brownie v1.17.2
Ganache CLI v6.12.2 (ganache-core: 2.13.2)
I am learning solidity according to reference(https://www.youtube.com/watch?v=M576WGiDBdQ&t=25510s).
I wrote and deployed a smart contract(scripts/deploy.py) using brownie framework, it worked.
Then tried to write a test script(tests/test_simple_storage.py) that gave me error information in the terminal.
Googled this and tried to delete all the files in brownie projects' build folder and deployed the contract(scripts/deploy.py) again, it's the same error.
And tried to change the private key and index, for accounts[0]to account[-1]and account[1], the same error result.
FYI:I typed the command "ganache-cli —deterministic " in the terminal. So the account and private key are not random.
Saved the Ganache's account[0]'s private key in .env files,like this
.env
...ANSWER
Answered 2022-Jan-07 at 02:10When connecting to a remote network via a hosted node such as Infura, the Accounts container will be empty. Before you can perform any transactions you must add a local account to Brownie. Looks like you are not on development environment.
Brownie documentation will guide you how to set up accounts
QUESTION
I am trying to install eth-brownie using the documentation, on Ubuntu 20.04.2. I've been going in circles for hours, trying to do everything the messages are telling me.
pipx install eth-brownie
gives: Not installing to existing directory '/home/me/.local/pipx/venvs/eth-brownie'. Pass '--force' to force installation
fine, I tried with --force, and then got the following:
Installing to existing directory '/home/me/.local/pipx/venvs/eth-brownie' The virtual environment was not created successfully because ensurepip is not available. On Debian/Ubuntu systems, you need to install the python3-venv package using the following command.
apt-get install python3-venv
I know I already have python3, because when I type python3 I get: Python 3.8.5, blabla
But ok, let's try doing what it says. Tried, asked to use sudo. Added 'sudo' in the beginning, and got: The following packages have unmet dependencies: python3-venv : Depends: python3.8-venv (>= 3.8.2-1~) but it is not going to be installed E: Unable to correct problems, you have held broken packages.
I searched for similar questions and have been going at it for hours. I tried the 'update' command, 'the 'upgrade' command, the 'dpkg' thing, and every suggestion I could find. I just want to have eth-brownie. Can someone please help?
...ANSWER
Answered 2022-Jan-24 at 22:46I had some errors on Ubuntu too. But it worked installing Brownie on a virtual environment.
- Install Virtual Env:
QUESTION
I have different venvs in my machine in which I have python 3.10.
Now for a specific project, I realised that python 3.10 is not suitable as some libraries are still not compatible. Therefore when creating a new venv for a new project, I would like to downgrade python, say to 3.8, only for this specific venv.
How can I do that? What should I type onto the terminal to do this?
PS: I use VS and its terminal to create venv
...ANSWER
Answered 2021-Dec-20 at 14:00You can have multiple python versions installed at the same time and you can create virtual environments with the needed version. Make sure you have installed the python version you need and then specify its location when you create the virtual environment:
QUESTION
on my windows system I've succesfully installed a virtual environment (python version is 3.9) using windows command prompt
python -m venv C:\my_path\my_venv
Always using windows command prompt, I'm able to activate the created venv via
C:\my_path\my_venv\Scripts\activate.bat
I am sure the venv is correctly activated since:
- on the windows terminal, I see the command line is preceded by
(my_venv)
- if I activate python from the terminal (
python
) and run the following commands:import sys
;sys.path
I can see, in the list of paths, the desired path[..., 'C:\\my_path\\my_venv\\lib\\site-packages\\win32\\lib', ...]
- if I do stuff in the activated venv (like installing packages) everything works and is done inside the venv
To sum up, everything is fine so far.
I also have WSL2 (Ubuntu) and I'd like to activate the same venv using the Ubuntu terminal. If, from the Ubuntu terminal, I activate the venv
source /mnt/c/my_path/my_venv/Scripts/activate
it seems to work since the command line is preceeded by (my_venv)
, but when I run python (python3
command) and then run import sys
; sys.path
I see that the system is targeting the base Ubuntu python installation (version 3.8) and not the venv installation:
['', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages']
The venv is not really activated. Any suggestions to solve the issue?
If it can help, I add a couple of information.
If I try to create a venv directly using the Ubuntu terminal
python3 -m venv /mnt/c/my_path/my_venv_unix
and activate it via the Ubuntu terminal (source /mnt/c/my_path/my_venv_unix/bin/activate
) everything works fine, but that's not what I want: I'd like to use WSL to activate a virtual environment created using windows command prompt, since on my machine I've a lot of venvs created with windows and I don't want to replicate them.
Following the script C:\my_path\my_venv\Scripts\activate (/mnt/c/my_path/my_venv/Scripts/activate using wsl folders naming) (I had to change the EOL from windows to Ubuntu, otherwise the command source /mnt/c/my_path/my_venv/Scripts/activate
would not have worked)
ANSWER
Answered 2021-Dec-29 at 17:29Short answer: It's highly recommended to use the Linux version of Python and tools when in WSL. You'll find a number of posts here on Stack Overflow related to this, but your question is different enough (regarding venv) that it deserves its own answer.
More Detail:
Also worth reading this question. In that case, the question was around a dual-boot system and whether or not the same venv could be shared between Windows and Linux.
I know it seems like things might be better on WSL, where you can run Windows .exe
cutables under Linux, but it really isn't for this particular case.
You've solved the first problem, in the difference in line endings, but the next problem that you are facing is the difference in the directory format. After sourcing activate
, do an echo $PATH
and you'll see that the Windows style C:\path\to\the\venv
path has been prepended to your PATH
. For WSL, that would need to be /mnt/c/path/to/the/venv
.
That's not going to work.
Once you fix that (again, by editing activate
), you are still trying to run python3
. The venv executable is actually python.exe
. Under WSL, you do have to specify the extension.
So if you:
- Change the line-endings from CRLF to LF
- Change the path style in
activate
from Windows to WSL2 format - Use the
python.exe
executable
Then you can at least launch the Windows Python version. Your import sys; sys.path
will show the Windows paths.
That said, you are almost certainly going to run into additional problems that don't make it worth doing this. For instance, if a script assumes python
or python3
, or even pip
; then those are going to fail because it needs to call, e.g., pip.exe
.
Line endings and native code will also be a problem.
For these reasons (and likely more), it's highly recommended to use the Linux version of Python when in WSL.
QUESTION
I set up my development environment on Fedora 35 and when I run any brownie command such as $ brownie console
or even brownie --version
I get the following error:
ANSWER
Answered 2021-Dec-22 at 20:40The problem here seems to be Python 3.10.1!
I used anaconda to create a new virtual environment with Python 3.8.12, installed brownie using pipx install --python python3.8 eth-brownie
and it worked!
The trick here was, to also tell pipx to use another python version, otherwise it would create a dependency to the global python version, which is python 3.10 in my case.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install venvs
You can use venvs like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page