OSError: No such file or directory: '[virtual environment]/..local/lib/python2.7/site-packages/[package-name]-0.1-py2.7.egg' - pip

I am creating an PYPI application(to install using pip). I built it using command "python setup.py build" and installed in local machine(inside virtual environment. using [ubuntu 12.4]). whenever I try to UN-install using "pip uninstall " it gives the following error.
Message displayed while installing it
Copying fantain_DBC-0.1-py2.7.egg to /home/kavin/.virtualenvs/pavan_pkg/lib/python2.7/site-packages
Adding fantain-DBC 0.1 to easy-install.pth file
Installed /home/kavin/.virtualenvs/pavan_pkg/lib/python2.7/site-packages/fantain_DBC-0.1-py2.7.egg
Processing dependencies for fantain-DBC==0.1
Finished processing dependencies for fantain-DBC==0.1
Blockquote
Error message while uninstalling
OSError: [Errno 2] No such file or directory: '/home/kavin/.virtualenvs/pavan_pkg/local/lib/python2.7/site-packages/fantain_DBC-0.1-py2.7.egg'

Related

Creating\Updating conda venv with yml file fails in pip dependencies part with gym[rom]

Im trying to create a virtual enviorment based on an enviorment.yml file with the command:
"mamba env update -f environment.yml -n cs236781-hw".
The yml file contains this part:
- pip:
- nbmerge
- gym[atari,accept-rom-license,box2d]==0.21.0
which seems to fail as I get this error in my minicinda prompt:
Building wheel for AutoROM.accept-rom-license (pyproject.toml): started
Building wheel for AutoROM.accept-rom-license (pyproject.toml): finished with status 'error'
Failed to build AutoROM.accept-rom-license
Pip subprocess error:
error: subprocess-exited-with-error
× Building wheel for AutoROM.accept-rom-license (pyproject.toml) did not run successfully.
ImportError: DLL load failed while importing libtorrent: The specified module could not be found.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for AutoROM.accept-rom-license
ERROR: Could not build wheels for AutoROM.accept-rom-license, which is required to install pyproject.toml-based projects
failed
CondaEnvException: Pip failed
Ive tried so many things to fix this (reinstalling conda, python even vscode and its c++ build tools) with no success.
Does anyone have any clue?
I assume you are working on Windows x64?
If yes, you will probably need OpenSSL 1.1.x.
Please try to install e.g. Win64OpenSSL_Light-1_1_1s.exe first, to get the required SSL libraries.
https://slproweb.com/products/Win32OpenSSL.html
Regards,
Konstantin

C:\Users\stc>cxxtestgen --version python: can't open file 'C:\\Users\\stc\\cxxtestgen': [Errno 2] No such file or directory

When i install cxxtest then it installed successfully . but when i check its version on cmd it show that python can't open file no such directory. I have installed python also. I add the path also after them this type of error came.

Jupyter lab build fail after installing plotly extension

Plotly figures are not rendered/displayed in jupyterlab. I therefore tried to install the extension jupyter labextension install #jupyter-widgets/jupyterlab-manager jupyterlab-plotly. Afterwards I was asked to run the jupyter lab build and this failed. I have no idea where the problem is.
Install info:
I installed a venv with pyenv running python 3.8.5.
jupyter --version
jupyter core : 4.7.1
jupyter-notebook : 6.4.0
qtconsole : not installed
ipython : 7.25.0
ipykernel : 6.0.3
jupyter client : 6.1.12
jupyter lab : 3.0.12
nbconvert : 6.1.0
ipywidgets : 7.6.3
nbformat : 5.1.3
traitlets : 5.0.5
npm --version
7.11.2
node --version
v16.1.0
I am restricted to use WSL1 because of company requirements.
I’ll post below the command outputs for
jupyter labextension list
jupyter lab build
cat /tmp/jupyterlab-debug-5vr2zquq.log
jupyter labextension install #jupyter-widgets/jupyterlab-manager --minimize=False
Any advice would be appreciated. I have no idea how to fix this.
Thanks
❯ jupyter labextension list
JupyterLab v3.0.16
/home/bebop/.local/share/jupyter/labextensions
#jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)
/mnt/s/dokumente/Privat/neue_fische/ot/ot-sopra_steria/.venv/share/jupyter/labextensions
jupyterlab-plotly v5.1.0 enabled OK
Other labextensions (built into JupyterLab)
app dir: /mnt/s/dokumente/Privat/neue_fische/ot/ot-sopra_steria/.venv/share/jupyter/lab
plotlywidget v4.14.3 enabled OK
Build recommended, please run jupyter lab build:
plotlywidget needs to be included in build
❯ jupyter lab build
[LabBuildApp] JupyterLab 3.0.16
[LabBuildApp] Building in /mnt/s/dokumente/Privat/path/.venv/share/jupyter/lab
[LabBuildApp] Building jupyterlab assets (production, minimized)
Build failed.
Troubleshooting: If the build failed due to an out-of-memory error, you
may be able to fix it by disabling the dev_build and/or minimize options.
If you are building via the jupyter lab build command, you can disable
these options like so:
jupyter lab build --dev-build=False --minimize=False
You can also disable these options for all JupyterLab builds by adding these
lines to a Jupyter config file named jupyter_config.py:
c.LabBuildApp.minimize = False
c.LabBuildApp.dev_build = False
If you don’t already have a jupyter_config.py file, you can create one by
adding a blank file of that name to any of the Jupyter config directories.
The config directories can be listed by running:
jupyter --paths
Explanation:
dev-build: This option controls whether a dev or a more streamlined
production build is used. This option will default to False (i.e., the
production build) for most users. However, if you have any labextensions
installed from local files, this option will instead default to True.
Explicitly setting dev-build to False will ensure that the production
build is used in all circumstances.
minimize: This option controls whether your JS bundle is minified
during the Webpack build, which helps to improve JupyterLab’s overall
performance. However, the minifier plugin used by Webpack is very memory
intensive, so turning it off may help the build finish successfully in
low-memory environments.
An error occured.
shutil.Error: [(’/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/staging/templates’, ‘/mnt/s/dokumente/Privat/path/.venv/share/jupyter/lab/staging/templates’, “[Errno 13] Permission denied: ‘/mnt/s/dokumente/Privat/path/.venv/share/jupyter/lab/staging/templates’”)]
See the log file for details: /tmp/jupyterlab-debug-5vr2zquq.log
❯ cat /tmp/jupyterlab-debug-5vr2zquq.log
[LabBuildApp] Building in /mnt/s/dokumente/Privat/path/.venv/share/jupyter/lab
[LabBuildApp] Node v16.1.0
[LabBuildApp] Yarn configuration loaded.
[LabBuildApp] Building jupyterlab assets (production, minimized)
[LabBuildApp] Traceback (most recent call last):
[LabBuildApp] File “/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/debuglog.py”, line 47, in debug_logging
yield
[LabBuildApp] File “/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/labapp.py”, line 166, in start
raise e
[LabBuildApp] File “/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/labapp.py”, line 162, in start
build(name=self.name, version=self.version,
[LabBuildApp] File “/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/commands.py”, line 469, in build
return handler.build(name=name, version=version, static_url=static_url,
[LabBuildApp] File “/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/commands.py”, line 657, in build
self._populate_staging(
[LabBuildApp] File “/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/commands.py”, line 1180, in _populate_staging
shutil.copytree(pjoin(HERE, ‘staging’, ‘templates’), templates)
[LabBuildApp] File “/home/bebop/.pyenv/versions/3.8.5/lib/python3.8/shutil.py”, line 554, in copytree
return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
[LabBuildApp] File “/home/bebop/.pyenv/versions/3.8.5/lib/python3.8/shutil.py”, line 510, in _copytree
raise Error(errors)
[LabBuildApp] shutil.Error: [(’/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/staging/templates’, ‘/mnt/s/dokumente/Privatpath/.venv/share/jupyter/lab/staging/templates’, “[Errno 13] Permission denied: ‘/mnt/s/dokumente/Privat/path/.venv/share/jupyter/lab/staging/templates’”)]
[LabBuildApp] Exiting application: JupyterLab
❯ jupyter labextension install #jupyter-widgets/jupyterlab-manager --minimize=False
Building jupyterlab assets (production, not minimized)
An error occured.
shutil.Error: [(’/mnt/s/dokumente/Privat/path/.venv/lib/python3.8/site-packages/jupyterlab/staging/templates’, ‘/mnt/s/dokumente/path/.venv/share/jupyter/lab/staging/templates’, “[Errno 13] Permission denied: ‘/mnt/s/dokumente/Privat/path/.venv/share/jupyter/lab/staging/templates’”)]
You should not need to install the extension from source. JupyterLab 3.0 introduced prebuilt extensions system that allows users to install extensions from pip (and conda) without the need for the build step making all the trouble of troubleshooting failed builds disappear. It seems that you used an old set of instructions for installing plotly, as plotly 5.0+ supports prebuilt extensions for JupyterLab. First uninstall the source extensions that you just installed (non of those are needed):
jupyter labextension uninstall #jupyter-widgets/jupyterlab-manager jupyterlab-plotly plotlywidget
Optional: verify list of extensions with:
jupyter labextension list
Then install a new plotly version with pip or conda:
pip install "plotly>=5" "ipywidgets>=7.6"
# or, if using conda:
# conda install -c conda "plotly>=5"
# conda install "ipywidgets>=7.6"
Both widget and renderer are included, so no need to install plotlywidget separately.
Check list of extensions again:
jupyter labextension list
You should now see lines with:
jupyterlab-plotly v5.1.0 enabled OK
#jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)
(the version may be newer in the future of course).

Building QScintilla on Windows fails

I was able to build the most recent version of QScintilla (2.9.1) on Ubuntu 15.10. I have tried building the same version on Windows 10 using Qt 5.6. QMake run to completion without giving errors. A call to Make gives the following error message:
make -f Makefile.Release
make[1]: Entering directory 'G:/Sources/QScintilla/QScintilla_gpl-2.9.2/Qt4Qt5'
Makefile.Release:822: *** missing separator. Stop.
make[1]: Leaving directory 'G:/Sources/QScintilla/QScintilla_gpl-2.9.2/Qt4Qt5'
makefile:34: recipe for target 'release' failed
make: *** [release] Error 2
What am I doing wrong? How can I solve it?
I ran into similar issues. I eventually got a working 'QScintilla' on my Windows 10 machine as described below.
My PC has the following specifications:
Windows 10, 64-bit OS
Anaconda package installed (Python 3.5)
PyQt5 installed (download the .exe installer from https://www.riverbankcomputing.com/software/pyqt/download5)
STEP 1:
Download the file QScintilla-2.9.2-cp35-none-win_amd64.whl from the site https://pypi.python.org/pypi/QScintilla .
Put the file in the folder:
C: \ .. \ Anaconda \ Scripts \
We will use this .whl file to do the installation of QScintilla.
_
STEP 2:
Open the Windows cmd tool with Administrator privileges! Now type the following command:
> cd "C:\..\Anaconda\Scripts"
This brings the cmd shell to the right spot. Now type the following command:
> pip3 install QScintilla
If all goes well, you get the following message:
> pip3 install QScintilla
Collecting QScintilla
Downloading QScintilla-2.9.2-cp35-none-win_amd64.whl (1.6MB)
100% |################################| 1.6MB 984kB/s
Collecting PyQt5 (from QScintilla)
Downloading PyQt5-5.6-cp35-none-win_amd64.whl (74.7MB)
100% |################################| 74.7MB 23kB/s
Collecting sip (from PyQt5->QScintilla)
Downloading sip-4.18-cp35-none-win_amd64.whl (46kB)
100% |################################| 51kB 5.7MB/s
Installing collected packages: sip, PyQt5, QScintilla
..
Successfully installed PyQt5-5.6 QScintilla-2.9.2 sip-4.18
_
STEP 3:
I did not get the message "Successfully installed" from the first shot. Instead I got the following error message:
PermissionError: [Errno 13] Permission denied: 'C:\..\anaconda\Lib\site-packages\sip.pyd'
Apparently the file sip.pyd sitting in the directory C:\..\anaconda\Lib\site-packages could not be accessed. So I opened another Windows command shell (of course again with Administrator privileges!) and typed the following command:
> icacls "C:\..\Anaconda\Lib\site-packages" /grant "Administrators":(OI)(CI)F /T
This command will give full access rights (read - modify and write) to all "Administrator" users for all the files in the site-packages folder, and all the files in its subfolders. While this command executes, you should get the following messages:
...
processed file: C:\..\Anaconda\Lib\site-packages\__pycache__\readline.cpython-35.pyc
processed file: C:\..\Anaconda\Lib\site-packages\__pycache__\simplegeneric.cpython-35.pyc
processed file: C:\..\Anaconda\Lib\site-packages\__pycache__\six.cpython-35.pyc
processed file: C:\..\Anaconda\Lib\site-packages\__pycache__\test_path.cpython-35.pyc
processed file: C:\..\Anaconda\Lib\site-packages\__pycache__\test_pycosat.cpython-35.pyc
...
Successfully processed 38589 files; Failed processing 0 files
Now you can repeat STEP 2, and it should work!

Error Creating First Pebble Project

I am trying to create my first Pebble project and it simply fails when I run the pebble new_profile hello_world.
johndoe-mbp-2:projects johndoe$ pebble new-profile hello_world
[DEBUG ] [Analytics] header: {'User-Agent': 'Pebble SDK/2.0-BETA6 (Darwin-13.0.0-x86_64-i386-64bit-python-2.7.5)'}, data: {'ck': '2.7.5', 'cn': 'Darwin-13.0.0-x86_64-i386-64bit', 'cid': '3247db56-af31-4738-999a-uuuuu', 'tid': 'UA-66666-7', 't': 'event', 'v': 1, 'cs': '3247db56-af31-4738-999a-yyyyy'}
category: install
action: import
label: fail: missing import: No module named websocket
value: 0
Traceback (most recent call last):
File "/Users/johndoe/pebble-dev/PebbleSDK-2.0-BETA6/bin/../tools/pebble.py", line 14, in <module>
import websocket
ImportError: No module named websocket
Any ideas?
Try uninstalling any websocket module on your computer, and reinstalling the Pebble SDK depencies:
pip uninstall websocket
pip install --user -r ~/pebble-dev/PebbleSDK-2.0-BETA7/requirements.txt
Note: You will need to update the location of the SDK in this command line.
Make sure you provide an absolute path to the requirements.txt file. I tried running the command from the directory that I installed the Pebble SDK:
$PEBBLE_HOME> pip install requirements.txt
which resulted in:
Downloading/unpacking requirements.txt
Real name of requirement requirements.txt is requirements.txt
Could not find any downloads that satisfy the requirement requirements.txt
Cleaning up...
No distributions at all found for requirements.txt
Storing debug log for failure in $HOME/.pip/pip.log
Checking out that pip.log file showed that pip was trying to access requirements.txt from https://pypi.python.org/simple/requirements.txt/ which was 404ing.
Once I changed to use an absolute path it was all good:
> pip install -r $PEBBLE_HOME/requirements.txt # Where $PEBBLE_HOME is where you put the SDK

Resources