You are correct that it isn't in pypi for some reason. To install it run
pip install http: //download.gna.org/pychart/PyChart-1.39.tar.gz
But as Adrian Merrall said it's a lot cleaner to add the full URL in requirements.txt instead of PyChart==1.39
:
http: //download.gna.org/pychart/PyChart-1.39.tar.gz
To create a virtual environment, go to your project’s directory and run venv. If you are using Python 2, replace venv with virtualenv in the below commands.,The second argument is the location to create the virtual environment. Generally, you can just create this in your project and call it env.,If you want to re-enter the virtual environment just follow the same instructions above about activating a virtual environment. There’s no need to re-create the virtual environment.,If you are using Python 3.3 or newer, the venv module is the preferred way to create and manage virtual environments. venv is included in the Python standard library and requires no additional installation. If you are using venv, you may skip this section.
python3 - m pip install--user--upgrade pip
python3 - m pip--version
pip 21.1 .3 from $HOME / .local / lib / python3 .9 / site - packages(python 3.9)
py - m pip install--upgrade pip
py - m pip--version
pip 21.1 .3 from c: \python39\ lib\ site - packages(Python 3.9 .4)
python3 - m pip install--user virtualenv
py - m pip install--user virtualenv
In all these cases, virtualenv can help you. It creates an environment that has its own installation directories, that doesn’t share libraries with other virtualenv environments (and optionally doesn’t access the globally installed libraries either).,While this creates an environment, it doesn’t put anything into the environment. Developers may find it useful to distribute a script that sets up a particular environment, for example a script that installs a particular web application.,Normally environments are tied to a specific path. That means that you cannot move an environment around or copy it to another computer. You can fix up an environment to make it relocatable with the command:,Added a function virtualenv.install_python for more fine-grained access to what virtualenv.create_environment does.
To install globally with pip (if you have pip 1.3 or greater installed globally):
$[sudo] pip install virtualenv
Or to get the latest unreleased dev version:
$[sudo] pip install https: //github.com/pypa/virtualenv/tarball/develop
To install globally from source:
$ curl - O https: //pypi.python.org/packages/source/v/virtualenv/virtualenv-X.X.tar.gz
$ tar xvfz virtualenv - X.X.tar.gz
$ cd virtualenv - X.X
$[sudo] python setup.py install
The basic usage is:
$ virtualenv ENV
On Posix systems you can do:
$ source bin / activate
On Windows you just do:
> \path\ to\ env\ Scripts\ activate
Then you’ll be asked to trust the signer, when executing the script. You will be prompted with the following:
PS C: \ > virtualenv.\foo
New python executable in C: \foo\ Scripts\ python.exe
Installing setuptools................done.
Installing pip...................done.
PS C: \ > .\foo\ scripts\ activate
Do you want to run software from this untrusted publisher ?
File C : \foo\ scripts\ activate.ps1 is published by E = jannis @leidel.info,
CN = Jannis Leidel, L = Berlin, S = Berlin, C = DE, Description = 581796 - Gh7xfJxkxQSIO4E0
and is not trusted on your system.Only run scripts from trusted publishers.
[V] Never run[D] Do not run[R] Run once[A] Always run[ ? ] Help(
default is "D"): A(foo) PS C: \ >
Alternatively, you may relax the system execution policy to allow running of local scripts without verifying the code signature using the following:
PS C: \ > Set - ExecutionPolicy RemoteSigned
On Posix systems you can do:
$ source bin / activate
On Windows you just do:
> \path\ to\ env\ Scripts\ activate
In order to use the script, you have to relax your system’s execution policy to AllSigned, meaning all scripts on the system must be digitally signed to be executed. Since the virtualenv activation script is signed by one of the authors (Jannis Leidel) this level of the execution policy suffices. As an administrator run:
PS C: \ > Set - ExecutionPolicy AllSigned
Alternatively, you may relax the system execution policy to allow running of local scripts without verifying the code signature using the following:
PS C: \ > Set - ExecutionPolicy RemoteSigned
In order to use the script, you have to relax your system’s execution policy to AllSigned, meaning all scripts on the system must be digitally signed to be executed. Since the virtualenv activation script is signed by one of the authors (Jannis Leidel) this level of the execution policy suffices. As an administrator run:
PS C: \ > Set - ExecutionPolicy AllSigned
Then you’ll be asked to trust the signer, when executing the script. You will be prompted with the following:
PS C: \ > virtualenv.\foo
New python executable in C: \foo\ Scripts\ python.exe
Installing setuptools................done.
Installing pip...................done.
PS C: \ > .\foo\ scripts\ activate
Do you want to run software from this untrusted publisher ?
File C : \foo\ scripts\ activate.ps1 is published by E = jannis @leidel.info,
CN = Jannis Leidel, L = Berlin, S = Berlin, C = DE, Description = 581796 - Gh7xfJxkxQSIO4E0
and is not trusted on your system.Only run scripts from trusted publishers.
[V] Never run[D] Do not run[R] Run once[A] Always run[ ? ] Help(
default is "D"): A(foo) PS C: \ >
Alternatively, you may relax the system execution policy to allow running of local scripts without verifying the code signature using the following:
PS C: \ > Set - ExecutionPolicy RemoteSigned
For example, to automatically use a custom Python binary instead of the one virtualenv is run with you can also set an environment variable:
$
export VIRTUALENV_PYTHON = /opt/python - 3.3 / bin / python
$ virtualenv ENV
It’s the same as passing the option to virtualenv directly:
$ virtualenv--python = /opt/python - 3.3 / bin / python ENV
This also works for appending command line options, like --find-links. Just leave an empty space between the passsed values, e.g.:
$
export VIRTUALENV_EXTRA_SEARCH_DIR = "/path/to/dists /path/to/other/dists"
$ virtualenv ENV
The names of the settings are derived from the long command line option, e.g. the option --python would look like this:
[virtualenv]
python = /opt/python - 3.3 / bin / python
Appending options like --extra-search-dir can be written on multiple lines:
[virtualenv]
extra - search - dir =
/path/to / dists /
path / to / other / dists
Both sudo pip install and its other common variant sudo -H pip install should not be encouraged because it is a security risk to use root privileges to use pip to install Python packages from PyPI (Python Package Index).,No, this is correct. I cannot validate this claim. I always use sudo -H with pip. pip can only damage operating system files as much as apt. Only do not use sudo with pip when you want to install only for that user.,When, not if, a malicious package gets uploaded to PyPI... people who use "sudo pip install" will end up running that malicious payload with full system privileges. Do you want that? (#principleofleastprivilege),Using "sudo pip install" can and will overwrite python content provided by your OS vendor. When that happens, any vendor packages affected by this will not pass an "rpm --verify" and your packages will appear to be corrupted.
Note - I only used sudo
because when I tried the command apt-get -y install python-pip
it gave me 2 errors:
E: Could not open lock file /
var / lib / dpkg / lock - open(13: Permission denied)
E: Unable to lock the administration directory(/var/lib / dpkg / ), are you root ?